Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

drwxr-Sr-x vs. drwxr-sr-x

2,428 views
Skip to first unread message

Bart Kimble

unread,
Feb 28, 1996, 3:00:00 AM2/28/96
to b...@coriolis.esm.psu.edu
Could someone please tell me the difference in drwxr-Sr-x as
opposed to drwxr-sr-x and how I can change the S to s.


Thanks.

Bart

Michael Wojcik

unread,
Feb 28, 1996, 3:00:00 AM2/28/96
to
In article <313465...@coriolis.esm.psu.edu> Bart Kimble <b...@coriolis.esm.psu.edu> writes:
>Could someone please tell me the difference in drwxr-Sr-x as
>opposed to drwxr-sr-x and how I can change the S to s.

The set-group-ID (s or S in the second triplet) bit on a directory
forces files created in that directory to be owned by the group
that owns the directory. (They're still owned by the user that
created them.) Thus if I create a file in a directory that does
not have set-group (permissions of drwxrwxr-x, say), it is owned
by me and belongs to my current group:

$ ls -ld foo
drwxrwxr-x 2 mww staff 512 Feb 28 13:37 foo

$ touch foo/bar
$ ls -l foo/bar
-rw-rw-r-- 1 mww aai 0 Feb 28 13:37 bar

If the directory does have set-group (as in the two permission strings
you list above), then the file will be owned by me but belongs to
the directory's group:

$ ls -ld foo
drwxrwsr-x 2 mww staff 512 Feb 28 13:37 foo

$ touch foo/bar
$ ls -l foo/bar
-rw-rw-r-- 1 mww staff 0 Feb 28 13:37 bar

If the directory's permissions include an S instead of an s, then
the directory has set-group but not group-execute -- which means
that members of that group cannot cd to the directory. Usually a
pointless restriction (often people are members of more than one
group, so they can switch groups with the newgrp command and cd
into the directory, since it has execute permission for "other"...),
but that's what it means.

To change S to s, add group execute permission:

$ chmod g+x <directory name>

You may have to be root to do this.

Michael Wojcik m...@mfltd.co.uk
AAI Development, Micro Focus Inc.
Department of English, Miami University

Gerald Kroboth

unread,
Mar 1, 1996, 3:00:00 AM3/1/96
to
Bart Kimble writes:

> Could someone please tell me the difference in drwxr-Sr-x as
> opposed to drwxr-sr-x and how I can change the S to s.
>
>

> Thanks.
>
> Bart


Hi Bart,

Sorry in my first answer I forgot a little bit; you have to use:

chmod g [+/-] x filename or directory

Regards,

Gerald

0 new messages