[Re: Inherited Rights]

Matt Graham danceswithcrows@usa.net
8 Jun 2001 15:57:48 EDT


bl0wfish <apoc@lunarsurf.com> wrote:
> 
> 	If your using chown/chmod
> 	I believe it's the -R flag
[snipp]
>>How do you give inherited rights from the root of a folder to all files
>>and subdirectories within that folder.  I'm a newbie, please go easy.

First, define "inherited rights".  Do you mean that you want objects created
within a directory ("folder"?  that's a GUI-ism) to inherit the permissions
that that directory was created with, or do you want to do the recursive
chown+chmod that bl0wfish and Ed talked about?

The mechanism for the former involves setting special permissions bits on a
directory.  For example, if you have a directory that belongs to bob.ftpers ,
you can set the SGID bit on that directory, and everything created within that
directory will be owned by group ftpers no matter which user created it.  Note
that directories created within a SGID directory will also be SGID unless
explicitly chmodded otherwise.

You can add people to groups by editing /etc/group , people can belong to more
than one group, and you can use these groups to control access to various
files/directories.  In the "User Private Groups" model that RedHat, Mandrake,
and some BSDs use, each user's umask is set to 002 if they belong to a group
with the same name as their username, and 022 if not.

You set the SGID bit on something by doing "chmod g+s something".  man chmod
for more details.

Finally, Samba provides a large number of options for controlling access and
permissions on a share-level basis with its "force group", "force user",
"create mode", and similar options--handy if you need to share things with
Doze users.

-- 
Matt G / Dances With Crows
There is no Darkness in Eternity/But only Light too dim for us to see
"I backed up my brain to tape, but tar says the tape contains no data...."

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1