Re: Unix Setup

From: M (
Date: 05/26/02

Ty guys for your help

On Sun, May 26, 2002 at 02:58:37AM -0500, M was heard to say:

> Hello, I just read your message on the mailing list.
> I understand how to make a new group and add users to the group, but I

> don't understand how to give access to a folder and its subfolders to
> a group with chmod. If possible could you send me a example? My mud is

> in /usr/circle and group is called coder
> Thank you.
> PS I did understand what your trying to say, I just don't know how to
> do it, the part about chmod g+s

>From teh usr directory (which is where your three mud directories are
>if I
remember correctly) do the command 'chgrp -R <grp> <dirname>' to give
the group <grp> ownership to all files in teh directory <dirname>.  To
set teh sticky bit for group owner ship, do the command 'chmod -R g+s
<dirname>'. The '-R' option tells it to recursively (i.e., include
subdirectories) make the changes.

So from /usr/ you would do:

$ chgrp -R coder ./circle

to make coder the owning group for /usr/circle and all its files and
sub- dirs.

$ ls -l /usr/circle
drwxr-xr-x    2 you coder     4096 May 26 06:40 circle/

To make sure that any new files created in /usr/circle can be modified
by all group members you should set the sticky bit:

$ chmod g+s ./circle
$ ls -l /usr/circle
drwxr-sr-x    2 you coder     4096 May 26 06:40 circle/

This will only change teh circle directory (because I did not use the
'-R' to make it recursive).  Note the permissions 'drwxr-sr-x' as
compaired to before running the chmod command 'drwx-r-xr-x'.  Obviously,
you want the group to have write perms as well, so you can also do:

$ chmod -R g+w ./circle

to make all files/directories in /usr/circle group writable.

Let me know if you have questiosn with this. ;)


Larry Robinson

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT