My plugin writes a property file at startup or reads it if its already available. A few users on OSX(10.8 ) do have the problem that nothing happens and the plugin can not create the folders and the property file.
/Library/Application Support/COMPANYNAME/PRODUCTNAME.xml
or
USERNAME/Library/Application Support/COMPANYNAME/PRODUCTNAME.xml
Is this a security issue and how can i make sure that the plugin can create the file on every system?
I’d strongly suggest not trying to use the common settings - writing to /Library is almost certain to be read-only, unless you’re running with root permissions.
And yes, you might want to call saveIfNeeded() to make sure it gets flushed after writing something important to it.
[quote=“jules”]I’d strongly suggest not trying to use the common settings - writing to /Library is almost certain to be read-only, unless you’re running with root permissions.
And yes, you might want to call saveIfNeeded() to make sure it gets flushed after writing something important to it.[/quote]
Thanks for that info.
Jules is right, and the policy changed since Lion (10.7) included: /Library/Application Support/ and its subdirectories are now read only, while the same path starting from the user home directory is also writeable.
The common application data directory /Library/Application Support/yourapplication/ should only contain read-only files that are put there by the installer (manual, resources, etc), while settings and customization should be stored (per user) in their ~/Library/Application Support/yourapplication/ folder