Friday, December 9, 2016

linux - Set gid bit not working




I have these permissions on a folder.



drwxr-sr-x  2 root    sharedmaster  4096 2010-09-22 10:36 rantest99


I have user tony which is in the group sharedmaster. When I try to mkdir from tony it says permission denied. Why is that?



I have set the gid bit on directory so that new directory has group read write permissions. Where am I wrong.


Answer



In addition granting write access on the parent directory you almost certainly need to adjust the umask of the user which is probably set to filter away group/other write access.




You probably want to set a umask of 0002.


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...