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 Answer
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 :)
-
6WARNING: executing
chmod -R g+rwx /home/u1makes ALL FILES inside directory/home/u1executable! THIS IS NOT SECUREAndrés Morales– Andrés Morales2017-10-25 16:45:29 +00:00Commented Oct 25, 2017 at 16:45
ls -lfor the directory in question and for /home/.