LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Group permissions (https://www.linuxquestions.org/questions/linux-newbie-8/group-permissions-4175618993/)

yod 12-05-2017 03:06 AM

Group permissions
 
Hi guys, if I create a directory and assign to it an owner and a group, both the owner and the group have the permissions rwx, as you can see:
https://image.ibb.co/etd1pb/dj.png
When I add the same group ("sharex") to another user, for example mavetek2, why I get permission denied when I try to write inside that directory?

business_kid 12-05-2017 04:36 AM

There's a thing called a umask, which sets default permissions when creating files. The usual umask gives 0644 for files (owner only can write) and 0755 for directories. Try setting the directory to 0775, and the group to 0664, and see if you can write then.

Note that this is insecure and as gift to snoopers and hackers.

yod 12-05-2017 09:49 AM

Quote:

Originally Posted by business_kid (Post 5789092)
There's a thing called a umask, which sets default permissions when creating files. The usual umask gives 0644 for files (owner only can write) and 0755 for directories. Try setting the directory to 0775, and the group to 0664, and see if you can write then.

Note that this is insecure and as gift to snoopers and hackers.

After a reboot it worked, but i didn't know umask so its all good, thank you for your helping

jpollard 12-08-2017 03:20 PM

Quote:

Originally Posted by yod (Post 5789212)
After a reboot it worked, but i didn't know umask so its all good, thank you for your helping

Note: if you added the user to the group, that user must logout and login again before that group is active for the process started as that user will have access.

A reboot forces a logout and login... so that would explain why it worked after a reboot.


All times are GMT -5. The time now is 11:45 PM.