[X-Unix] Is it possible to set unique umask for folder?

Craig A. Finseth fin at finseth.com
Wed Nov 24 05:00:34 PST 2004


   > We have some files being saved to a directory (by the Finder IIRC).
   > These files have default permissions of 755 - which is Mac OS X's
   > default from what I can gather. What we'd like is that files saved to
   > this particular directory have universal read and write privileges
   > (777). For fairly obvious reasons, we'd prefer not to change the system
   > wide defaults, just the mode for this one directory.
   > 
   > Is this possible? Can one have a directory specific umask?
	...
   As far as I understand, no - umask is a system-wide setting.
	...

Actually, it's per-process.

There are a couple of choices.

First, is there any way to set the (default) umask in the process that is 
doing the saving?

Second, you could write an AppleScript to run whenever the directory is
changed.  It just needs to do the equivalent of:

	chmod a+rw *

Craig


More information about the X-Unix mailing list