I have tired everything I can think of and have found on the net pretaining to this and it is not working. even this page

I create a partent dir, add a group name to the system, attach two users to that group. add the dir ownership to that dir. go in as one user, create a dir, su the other user and have that user try to edit the file of the first user, and it will not allow me to.

I need to have both or more then two users be able to do whatever within that dir and its subDir created by anyone that is attached to the group that owns it.

sudo find /run/media/bob/WD3TB/ftp-test/ -type d -exec chmod g+rw '{}' -R \;

sudo chgrp -R ftptest run/media/bob/WD3TB/ftp-test

[bob@voided1 bob2dir]$ mkdir bobDir
[bob@voided1 bob2dir]$ ls -la
 total 12
 drwxr-sr-x 3 bob ftptest 4096 Dec  6 18:25 .
 drwxrws--- 4 bob ftptest 4096 Dec  6 18:18 ..
 drwxr-sr-x 2 bob ftptest 4096 Dec  6 18:25 bobDir

[bob@voided1 bob2dir]$ su userx
[email protected]/run/media/bob/WD3TB/ftp-test>> cd bob2dir
[email protected]/run/media/bob/WD3TB/ftp-test/bob2dir>> touch userxFile
touch: cannot touch 'userxFile': Permission denied

[email protected]/run/media/bob/WD3TB/ftp-test/bob2dir>> cat /etc/group

both users are attached to the ftptest group, that is attached as the group owner?

I can run the command and it works both are allowed to do whatever to each other, then when one or the other creates something new, dir, or file, then the other cannot touch it. permission denied.

I have even added each other to each others groups


and that does not work either.

how to give a group permissions to rwx at all times so ones that are attached to it can rwx everything within that dir owned by the group no matter when or who creates something , dir, or file. ??? what to do?

1 Answer 1


There are a few things to consider here:

  1. Users need execute permissions on a directory to move into that directory. When you type -exec chmod g+rw '{}' -R \; you are setting read (r) and write (w) permissions on the directory. Execute (x) is not set. I would change it to chmod g+rwx '{}'
  2. If you are finding every directory in that path with sudo find /run/media/bob/WD3TB/ftp-test/ -type d it is redundant to pass the --recursive ( -R) argument to chmod.
  3. You have changed permissions on the directory with sudo find /run/media/bob/WD3TB/ftp-test/ -type d -exec chmod g+rwx '{}' \; This gives members of the group permissions in the directory to read, write, and to execute (== cd or "move" ) into subdirectories. If you also want users to write to files, you need to add a second find command. Something like sudo find /run/media/bob/WD3TB/ftp-test/ -type f -exec chmod g+rw '{}' \; That would give read and write permissions to edit files.
  4. The id command for a user will show the group name and group number:

    vagrant@host:~$ id 
    uid=1000(vagrant) gid=1000(vagrant),groups=1000(vagrant),4(adm),24(cdrom),27(sudo),118(sambashare)

    This is important, in that it shows all the groups that user vagrant (with UID 1000) belongs to. The active group is currently gid=1000(vagrant)

  5. The 'ls -ln' command will show the group ID numbers for the groups that own the file. I have run into the situation before where the groups had a similar appearing name, but different group ID numbers.

  6. Your user has an active group. If the write permission is not working, try id to confirm membership in a group (like ftptest), then newgrp ftptest. The id command should subsequently confirm the active group membership is ftptest

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .