Danger, MacOS X Installer Package Authors!


December 30, 2003

Important safety tip, up there with "don't cross the streams":

If you write installer packages for MacOS X, be careful when installing things into /etc and /var!

In OS X, /etc and /var are symlinks to /private/etc and /private/var, respectively. If you try to install things directly into /etc or /var, the symlink will be overwritten with a real directory entry and your files will be copied into it, resulting in directories that are empty except for your newly installed files. The result is that unless you have a root shell open before installing, you'll completely hose the system.

So, if you need files to end up in /etc or /var, put them in /private/etc and /private/var.


Comments