

Also, MacPorts, and Fink (two OSS package managers for OS X) use the /opt and /sw trees respectively. Mac users generally frown on installers throwing crap all over the file system without an easy way to clean it up. If you do this, make sure to provide an unistaller script that removes the folders you add (assuming nothing else has been added to them by other apps/users/etc.!). Many UNIX ports do this as it keeps things more consistent with other OSes that they support.

Of course, since you'll need to do this in an installer script (either traditional unix style or via an OS X installation package), you could modify the read-write permissions of your db file.Īs others have pointed out, OS X is a UNIX OS, so you can create /var/lib or any other folder to your liking. If your command line tool is run as root (or via sudo), then you could put your database file in /Library/Application Support/your-app. Library is, by default read-only for non-administrator users. In general, OS X uses this pattern (system-level in /Library and user-level in ~/Library for application support, preferences, plugins, etc.). ), but many just use the application name. Application support folders are supposed to be named by the app's bundle identifier (e.g. These are in /Library/Application Support for system-wide and in ~/Library/Application Support/ for user-level support files. OS X defines application and user-level "application support" folders.
