[NTLUG:Discuss] Permissions, Permissions, Permissions

Wayne Walker wwalker at bybent.com
Wed Jun 21 10:36:16 CDT 2006


This is controlled by two things.

1. g+s (the 2 in 2770).  Known as a setgid bit, when set on a directory
means that new files and directories will inherit their group from the
parent directory, rather than getting the primary group of the user who
created the new file or directory.

2. umask controls the initial file permissions of new files and
directories.  For the behavior you want, all users who create files in
the /o directory must have their umask set to 0002.  The default on most
OS's these days is 0077 or 0022 both of which inhibit group write
permissions.

So, change the user's .bashrc to include "umask 0007" or "umask 0002".

Wayne

On Wed, Jun 21, 2006 at 10:20:40AM -0500, Bobby Sanders wrote:
> Some time ago I configured my Linux box as follows:
> 
> Created group, g.  Added users to group g.
> 
> Created a directory, /o, whose group was g and had permissions
> drwxrws---  ( chmod 2770)
> 
> When a member of g created a sudirectory of /o it belonged to the
> creating user, was in group g and had permissions drwxrws---, and so on
> down the tree.  Files created under /o or any of its subdirectories by a
> member of g were owned by the creating user, belonged to g and had the
> permissions -rw-rw----.
> 
> Had to replace the computer and cannot reconfigure /o the way I had
> it!  :(
> 
> I seem to remember that I had to change certain configuration files but
> I can't remember which ones nor how I changed them.  I have Goggled this
> problem, worked on it for 3 days - all to no avail, and need help quick.
> 
> So I come to you on bended knee meekly begging you to share your wisdom,
> knowledge, and experience with me.
> 
> Thanks,
> 
> Bobby Sanders
> 
> 
> 
> _______________________________________________
> http://ntlug.pmichaud.com/mailman/listinfo/discuss

-- 

Wayne Walker

www.unwiredbuyer.com - when you just can't be by the computer

wwalker at bybent.com                    Do you use Linux?!
http://www.bybent.com                 Get Counted!  http://counter.li.org/
Perl - http://www.perl.org/           Perl User Groups - http://www.pm.org/
Jabber:  wwalker at jabber.gnumber.com   AIM:     lwwalkerbybent
IRC:     wwalker on freenode.net



More information about the Discuss mailing list