• Mac OS X Server,  Mac Security

    Apache2 & umasks

    I’ve been noticing more and more people using Apache as a way of getting files to and from servers. Call me silly but I think we’re going to continue to see more and more of this. A really common issue that comes up with Apache2 is default permissions of new files. Mac OS X is great with ACLs and whatnot. But Apache is built for posix. Posix is built on the foundation that the permissions of new files that are created come from umask. If you have a script that uploads a file then you can set the permissions as part of the script. But if you just pull it…

  • Xsan

    Xsan: umask and Default Permissions

    I originally posted this at http://www.318.com/TechJournal By default the global permissions for new files written into an Xsan volume are 644 (rw-r–r–). This can result in a permissions problem where one user can read another user’s posted items, but not make changes to it.  This can be resolved by changing the default umask value for groups. It’s a simple command line: sudo defaults write -g NSUmask 23 In this case, the 23 is a decimal equivalent of “rw-”. So the result of running this command line is that files posted to the shared volume will have 664 permissions (rw-rw-r–), allowing other users in the group to modify the files. Note…