Jay Paulson wrote:
I have been messing around with file permissions on my SuSE box and found that the umask needs to be changed in order for files that are created in a directory to have group writable permission on them, otherwise they are set to not writable for the group. However, in my search to find an explanation of how umask works with all the different ways you can set it (022, 002, 0022, 0002, and more I'm sure) I haven't found anything that really explain what it does. Therefore, I'm a little bit lost on what to do.
Can anyone point me to a good resource for umask?
When you set the umask can you set it for a certain directory and it's sub directories or is it system wide?
Are there any security risks for setting the umask to 002? (Whatever that actually does :-] )
Thanks for any help! jay
Many Linux & Unix books desribe umask. However, you expand the octal numbers into binary, and wherever you've got a "1", you're removing a permission. So, a umask of 027 or 000 010 111, the owner has full rights, as allowed by the file permissions, the group has all but write and others have no permissions. Normally, the umask is determined at login, by a umask value in one of the login scripts, however, by setting the sticky bit, you can cause a directory's permissions to be inherited by its contents.