Originally Posted By: Virtual1
umask appears to reset to default (022) when you logout and login again. (in terminal) so it behaves more like a shell variable than anything else

not particularly useful unless you set it in your .profile, and I wouldn't expect it to work in other processes or in Finder?

i.e. if you open a terminal window and change the umask, it sticks. but if you then leave that window open even, and make a new terminal window and check umask, it's back at default

Zero surprises there. [would you expect it to work any different?]
As you noticed... if it needs to "stick" then put it in a startup file.


Originally Posted By: Virtual1
There's a daemon app that I'd love to set the umask to 002 instead of 022 because although I can assign the group to the files it makes, I cannot define the mask, so all the files it makes are read-only to the group it's a part of, and I have to update them all the time.

A daemon app? What's its name? Doesn't launchd manage it?
The umask can be set in its launchd.plist (see man launchd.plist)


Originally Posted By: Virtual1
I tried using "sudo -u daemonusername umask 002"
but it acted as though I had not done it when I tried
"sudo daemonusername umask", it was back at 022.

If you wish to run it from a command line (as opposed to tweaking the launchd.plist as just recommended), those commands don't look like they'd work.

This one maybe:
( umask 002 && daemonusername )

The parens put those items in a subshell, so the umask change doesn't affect the current terminal.


EDIT:
Originally Posted By: Virtual1
and I wouldn't expect it to work in other processes or in Finder?

Well... the question you initially asked was specific to terminal:
Quote:
that appears to change the umask that finder uses. how do you change the umask that terminal uses?

And now It seems you're looking for a global tweak???

I vaguely recall we can tinker with "NSUmask" in these files:
~/.MacOSX/environment.plist
~/Library/Preferences/.GlobalPreferences.plist
[and iirc they use decimal (not octal) values]

Google should turn up something... e.g.,
umask GlobalPreferences
or
umask environment.plist

EDIT:
Maybe those are obsolete in Leopard... How to set NSUmask in Leopard
Looks like we tweak umask in a file we create: /etc/launchd.conf

Last edited by Hal Itosis; 04/03/10 07:18 AM.