Tuesday, September 8, 2015

Linux user group folder permissions



I have a basic linux file permissions question:



I have a folder named test:



$ ls -la
drwxr-xr-x 5 root root 4096 2010-10-25 17:11 .

drwxr-xr-x 17 root root 4096 2010-10-25 16:53 ..
drw-rwS--- 3 root codedev 4096 2010-10-25 17:11 test


In this folder (test) I want all users that are members of the group codedev to have read and write access, even to those files (inside test) that other users has created.



I have a testuser:



$ groups testuser 
testuser : testuser codedev



Why can't the user testuser cd into the directory test? How should I do the make this work?


Answer



In order to cd to a directory the user needs execute permission on the directory too, either by dint of ownership, or at the group, or world/other level.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...