[K12OSN] File ownership help

Peter Scheie petre at maltzen.net
Mon Aug 21 02:34:54 UTC 2006


umask is not a property of files or directories, but rather of the user. 
   The system-wide umask is set in /etc/bashrc at line 11 (on k12ltsp 
5).  It defaults to 022, meaning that when a user creates a file 2 will 
be subtracted from 7 for other and for the group, which means the file 
will have default permissions of 755.  Change the umask setting in 
/etc/bashrc to 002, so that the group permissions are set to 7 (rwx) and 
that way everyone who puts a file into the directory where you've set 
the sticky bit will be able to also edit any of those files, assuming 
that's what you want.

Petre

Kevin Verheyen wrote:
> Is there a way to set the umask permanent on dirs?
> Or better: how to set the umask when login in?
> 
> Kevin
> 
> 
> Op 19-aug-06, om 23:19 heeft Peter Scheie het volgende geschreven:
> 
>> You may be thinking of the group sticky bit.  If you set this on a
>> directory, the group for any files created in that directory will be the
>> same as the group of the directory itself.  So, for example if you have
>> a directory /common and the group for it is users, and I, with ID
>> petre:petre, meaning my primary group is also called petre, put a file
>> in that directory, the group for that file will be users, not petre.  To
>> insure that everyone in the users group can read & write that file,
>> check the default umask, which strips rights away from files; hint,
>> you'll want the umask to be 002 if the group will need write permissions
>> for the files created. You set the stick bit with chmod:
>>
>> chmod g+s common
>>
>> HTH
>>
>> Petre
>>
>> mrok12osn at eastgranby.k12.ct.us wrote:
>>> A while back I remember reading about a way to always assign 
>>> ownership of
>>> a file to the owner of the directory regardless of who the creating user
>>> is.  I cannot remember where I read this.  Can someone point me to the
>>> document or tell me how to do this.
>>> Mark Orenstein
>>> East Granby, CT School System
>>> _______________________________________________
>>> K12OSN mailing list
>>> K12OSN at redhat.com
>>> https://www.redhat.com/mailman/listinfo/k12osn
>>> For more info see <http://www.k12os.org>
>>
>> _______________________________________________
>> K12OSN mailing list
>> K12OSN at redhat.com
>> https://www.redhat.com/mailman/listinfo/k12osn
>> For more info see <http://www.k12os.org>
>>
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
> 




More information about the K12OSN mailing list