create a directory belonging to the group - Redhat
This is a discussion on create a directory belonging to the group - Redhat ; Hi,
Let's say I am user 'dave' belonging to groups 'dave' and 'server'.
When I am in a certain directory, say /home/dave, I would like any
'mkdir dirname' command to result in 'dirname' being owned by 'dave'
and belonging to ...
-
create a directory belonging to the group
Hi,
Let's say I am user 'dave' belonging to groups 'dave' and 'server'.
When I am in a certain directory, say /home/dave, I would like any
'mkdir dirname' command to result in 'dirname' being owned by 'dave'
and belonging to group 'server'. But right now, the command
mkdir dirname
results in dirname being owned by user 'dave' and group 'dave'. What
should I do so that creating directories results in those directories
being owned by 'dave' but belonging to group 'server'?
Thanks, - Dave
-
Re: create a directory belonging to the group
D. Alvarado wrote:
> Let's say I am user 'dave' belonging to groups 'dave' and 'server'.
> When I am in a certain directory, say /home/dave, I would like any
> 'mkdir dirname' command to result in 'dirname' being owned by 'dave'
> and belonging to group 'server'. But right now, the command
>
> mkdir dirname
>
> results in dirname being owned by user 'dave' and group 'dave'. What
> should I do so that creating directories results in those directories
> being owned by 'dave' but belonging to group 'server'?
This is BSD semantics. Set the sguid bit on the directory (owned by
group "server") if you want BSD semantics.
Peter
-
Re: create a directory belonging to the group
D. Alvarado wrote:
> Hi,
> Let's say I am user 'dave' belonging to groups 'dave' and 'server'.
> When I am in a certain directory, say /home/dave, I would like any
> 'mkdir dirname' command to result in 'dirname' being owned by 'dave'
> and belonging to group 'server'. But right now, the command
>
> mkdir dirname
>
> results in dirname being owned by user 'dave' and group 'dave'. What
> should I do so that creating directories results in those directories
> being owned by 'dave' but belonging to group 'server'?
>
> Thanks, - Dave
chown -R dave:server mydir
man chown
-
Re: create a directory belonging to the group
On 04/07/04 10:35, D. Alvarado wrote:
> Hi,
> Let's say I am user 'dave' belonging to groups 'dave' and 'server'.
> When I am in a certain directory, say /home/dave, I would like any
> 'mkdir dirname' command to result in 'dirname' being owned by 'dave'
> and belonging to group 'server'. But right now, the command
>
> mkdir dirname
>
> results in dirname being owned by user 'dave' and group 'dave'. What
> should I do so that creating directories results in those directories
> being owned by 'dave' but belonging to group 'server'?
>
> Thanks, - Dave
Set username 'dave' to be in the primary group 'server', ie in
/etc/passwd set 'dave' to the the group number that correcponds to
'server' in /etc/groups.
-
Re: create a directory belonging to the group
On Sat, 03 Jul 2004 17:35:28 -0700, D. Alvarado wrote:
> Hi,
> Let's say I am user 'dave' belonging to groups 'dave' and 'server'.
> When I am in a certain directory, say /home/dave, I would like any
> 'mkdir dirname' command to result in 'dirname' being owned by 'dave' and
> belonging to group 'server'. But right now, the command
>
> mkdir dirname
>
> results in dirname being owned by user 'dave' and group 'dave'. What
> should I do so that creating directories results in those directories
> being owned by 'dave' but belonging to group 'server'?
>
> Thanks, - Dave
chmod g+s
will preserve the group ownership for all files and dirs created in that
directory.
--
i.m.
The USA Patriot Act is the most unpatriotic act in American history.