Allowed group can't access a folder

14,124

follow this instruction:

1) make sure that all the users u1,u2,u3 are in the group G:

lid -g GroupName

the output must contain all susers.

2) set group woner of the directory "recursively":

chown -R u1:GroupName /home/u1

Note: if you don't set the group owner recursively, you won't be able to view inner files and directories.

3) set the permissions of group owner of the directory "recursively":

chmod -R g+rwx /home/u1

Note: if you don't set the group owner permissions recursively, the changes won't be applied for inner files and directories.

now if you type ls -l /home/u1, the output will be like this:

drwxrwx---. 16 u1  GroupName  4096 Jan  8  2015 u1

I hope you get your problem solved soon :)

Share:
14,124

Related videos on Youtube

Vertus
Author by

Vertus

Math student

Updated on September 18, 2022

Comments

  • Vertus
    Vertus almost 2 years

    I've a weird problem on my linux machine, I've multiple users, we can say u1, u2, u3... who all belong to a group G. I have a group folder in /home who belong to one of these user (we'll say u1), and I wanted to allow other G users to read, write and execute in this folder, so I changed the folder's group to G (the owner still is u1), and set rwx permissions for the owner, for the group (G) and 000 for others, but G users can't access the folder... Why is that ? any ideas ? Thanks !

    • hayath786
      hayath786 over 8 years
      Please provide details. Show us at least the output of ls -l for the directory in question and for /home/.
  • Andrés Morales
    Andrés Morales over 6 years
    WARNING: executing chmod -R g+rwx /home/u1 makes ALL FILES inside directory /home/u1 executable! THIS IS NOT SECURE