Users, groups and directory access
David L Norris
dave at webaugur.com
Wed May 5 08:30:07 UTC 2004
On Tue, 2004-05-04 at 23:52, A.J. Bonnema wrote:
> Hi,
>
> I have a simple access I would like to solve. Reading the RedHat
> documentation on users and groups didn't help sufficiently. Maybe one of
> you guys, sysadmins, could help?
>
> I'm running a up to date Fedora core 1 (no test packages).
>
> The problem is:
>
> 1. I have a user let's say john with two gid's: one for john and one for
> proj. The group john is his primary group.
>
> 2. I also have a directory owned by user paul and he want everyone in
> group proj to be able to read and write and create directories and files
> in his directory /project. So (using the reference guide from red hat)
> he creates a directory /project and has the admin do the following
> sequence of commands:
>
> /usr/sbin/groupadd proj
> chown -R paul.proj /project
> /usr/bin/gpasswd -a john proj
> chmod 2775 /project
# create proj group
groupadd proj
# make an administrator own the root dir. paul.proj is also fine...
chown -R root.proj /project
# make permissions inherit to children...
chmod g+rwxs /project
# root can change john's group membership like this
usermod -G proj john
# which should be equivalent to this but I've had trouble with it
gpasswd -a john proj
# in theory, this would make Paul proj's administrator
gpasswd -A paul proj
# to verify john was added where he belongs:
grep john /etc/groups
> Now I have 2 questions:
> 1. Is there any way, to have all groups a user is member of, effective
> simultaneously?
Yes, logout and login. Group membership only becomes effective at
login.
> 2.
> How can john change his primary group on the commandline?
newgrp proj
--
David Norris
http://www.webaugur.com/dave/
ICQ - 412039
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20040505/3cb1769e/attachment-0002.bin
More information about the users
mailing list