1

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 !

  • 1
    Please provide details. Show us at least the output of ls -l for the directory in question and for /home/. – scai Nov 7 '15 at 19:23
4

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 :)

|improve this answer|||||
  • 4
    WARNING: executing chmod -R g+rwx /home/u1 makes ALL FILES inside directory /home/u1 executable! THIS IS NOT SECURE – Andrés Morales Oct 25 '17 at 16:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.