问题
My understanding is that the system-wide application support folder (i.e. /Library/Application Support/ as opposed to ~/Library/Application Support/ ) should be used by applications for storing files that are shared by all users on the machine. What confuses me, however, is that the regular user does not have writing permission into it. Assuming that messing around with file permissions is not the correct way to go, what is then the usage of such a folder?
I have checked out an application that uses this folder (VirtualBox) and it seems that it creates its own subfolder and writes onto it during installation only (when admin credentials are active).
Initially I thought /Library/Application Support/ was used very dynamically by applications during normal usage, but I am starting to suspect I was wrong. This folder is very rarely written into (possibly just once) and is mostly used to read from.
Am I correct? If so, where is the recommended place to write user-shared application data that is frequently read and written?
回答1:
'All Users' also imply superuser permission.
I think, [/Library/Application Support/]
best suit for the Privileged Helper Tools.
Am I correct? If so, where is the recommended place to write user-shared application data that is frequently read and written?
For this purpose, there is [/Users/Shared/Library/Application Support]
.
来源:https://stackoverflow.com/questions/25888421/the-intended-usage-of-library-application-support-on-os-x