Unix Shell - Setting group id problem

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > March 2004 > Setting group id problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Setting group id problem
Shaun Campbell

2004-03-27, 4:35 pm

I am installing cvs on Redhat Linux 7 and I am trying to set the group
automatically to the group of the repository no matter which group is the
login group of the person who creates a module or file.

For example I have a respository at /home/apt/dtp/cvsroot.

I set the permissions on the dtp directory by using the command

chgrp dtp /home/apt/dtp
chmod 6770 /home/apt/dtp.

The file permissions are:

drwsrws--- 4 apt stp 4096 Mar 27 20:31 dtp

When a user creates a new module in cvs whose group is apt the module gets
created with the group apt not dtp as I expected. This causes problems then
for users of cvs who belong to group dtp but apt. If I go into the directory
/home/apt/dtp/cvsroot and create a directory from the command line it has
the correct group of dtp. If I go furhter down into the
/home/apt/dtp/cvsroot/demo directory and create a new directory it doesn't
have the correct group.

I thought by setting the directory permissions in this manner all the files
and directories created in the dtp repository would have a group set of dtp.
Any ideas what I am doing wrong or is something to do with the way cvs
works?

Thanks

Shaun




Alvin SIU

2004-03-28, 1:34 am

Shaun Campbell wrote:
> I am installing cvs on Redhat Linux 7 and I am trying to set the group
> automatically to the group of the repository no matter which group is the
> login group of the person who creates a module or file.
>
> For example I have a respository at /home/apt/dtp/cvsroot.
>
> I set the permissions on the dtp directory by using the command
>
> chgrp dtp /home/apt/dtp
> chmod 6770 /home/apt/dtp.
>
> The file permissions are:
>
> drwsrws--- 4 apt stp 4096 Mar 27 20:31 dtp
>
> When a user creates a new module in cvs whose group is apt the module gets
> created with the group apt not dtp as I expected. This causes problems then
> for users of cvs who belong to group dtp but apt. If I go into the directory
> /home/apt/dtp/cvsroot and create a directory from the command line it has
> the correct group of dtp. If I go furhter down into the
> /home/apt/dtp/cvsroot/demo directory and create a new directory it doesn't
> have the correct group.
>
> I thought by setting the directory permissions in this manner all the files
> and directories created in the dtp repository would have a group set of dtp.
> Any ideas what I am doing wrong or is something to do with the way cvs
> works?
>
> Thanks
>
> Shaun
>
>
>
>



Assuming that you are the user uuu
mkdir -m 777 /home/spt/dtp
chgrp dtp /home/spt/dtp
should create the directory
drwxrwxrwx 4 uuu dtp 4096 Mar 27 20:31 dtp

Then,
chmod g+s dtp
should get
drwxrwsrwx 4 uuu dtp 4096 Mar 27 20:31 dtp

Then, everything under the directory dtp should be created
with the group dtp regardless of the owner.

Alvin SIU

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com