Am Son, 2003-04-20 um 05.17 schrieb Francisco Castellon: > Hello list: > > > > I have been reading the documentation on chmod on the manual pages and > from a few other sources, howver I still have a couple of questions. > > > > Alright, first this is what I want to do, I have a directory that > belongs to ROOT and I want to make it readable, writable and > executable to another user however I don’t want to loose the > permissions that root already has in that directory. > > > > To illustrate, assume that I have a directory called DATA that is > owned by root, and I have a user called “admin” to whom I want to give > full access to DATA, however I DO NOT want to “admin” give admin any > other root like permissions outside of that folder, so that is why I > don’t want to add the “admin” user to the same group that root belongs > to (is it called “staff” or “root”?). So I really don’t want to open > the DATA directory public to ALL users just to the “admin” user. So > essentially what I want to do is for the owner of the directory to > give read, write and execute permissions to another user (or group for > that matter) for that directory. Add your user "admin" to the group "adm" (man usermod)and set the permissions on /DATA as follows: root@mhcln02:/ >chgrp adm DATA #set group to adm for /DATA root@mhcln02:/ >chmod g+rwx DATA #give rwx permissions to adm root@mhcln02:/ >ll|grep DATA drwxrwxr-x 2 root adm 48 Apr 20 08:51 DATA Now all users in group "adm" can read and write in /DATA. Beware that "admin" can delete all files owned by root in /DATA but not modify them. If "admin" should be able to modify existing files in /DATA do a chgrp -R adm /DATA;chmod -R g+w /DATA > > > > Second: say I have a user called TEST1 in the group called TEST1 (as > it is often the case in Unix when you create a user that it creates a > group with the same name as the user). If user TEST1 is the owner of > the folder called DIR1 what is the difference of the outcome between > running: > > > > chmod 740 DIR1 > > > > and > > > > chmod 470 DIR1 > > > > I realize that one gives full access to the group and read only access > to the user and the other command does the opposite, but in a case > that TEST1 is the only user in TEST1 then does it make a difference > above what I do? Not really. > What I am trying to get at is what is the purpose of trying to > manipulate the user access or the group access for that matter if you > cant specify a different user or group other than the owner’s > DIRECTLY? Huh? You can change the group of the directory: man chgrp, HTH -- Matthias Hentges Cologne / Germany [www.hentges.net] -> PGP welcome, HTML tolerated ICQ: 97 26 97 4 -> No files, no URL's My OS: Debian Woody: Geek by Nature, Linux by Choice
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil