Re: umask?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, Aug 23rd 2005 at 11:37 -0500, quoth Jay Paulson:

=>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

First read the manpage for umask. All of it. Then google up "user private 
groups" to see how umask and groups play together.

The simple explanation is that the value of umask will be subtracted from 
the protection mask of whatever you create. If you are creating an 
executable file and your umask is 022 then the resulting protection on the 
file will be 777-022==755

If you want to work in a group of multiple people then you want your umask 
to be set to 002

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux