How do I set the default file permissions for GUI apps in Lion?

I've set my umask in my .bashrc file to 007. Any files created on the command line after loading my bashrc file respects this setting. I want to be able to set the umask to 007 for any files created using non-command line apps.

This document talks about setting the umask via launchd. And it kind of works. If I follow these directions I can change the default permissions on a GUI created file from rw-r--r-- to rw-rw---- but the directories still are not group writeable (i.e. I want them to be rwxrwx--- but they are rwxr-x--- instead)

The analog on Linux would be /etc/login.defs as the place to set the umask.

What do I change in order for the umask to be set properly (i.e. the way I want it)?


I think you have done what you could; the umask really is 077. When programs create files or directories via the mkdir system call, they specify a mode. The file or directory ends up with a mode which is the specified mode, but with any 1 bits from the umask cleared. So in all likelihood, the GUI programs create their directories with a specified mode 755, and if so, there is no change of the umask that will help. (If all GUI programs do this, it is probably because they all use the same library to create the directories they want to exist.)