Group permissions don't work. (12.04 LTS)

Asked by Bo Elliot Miller

The deal: I want to set-up a folder to share with a group of users on the machine which has permissions of 750 (u=rwx,g=r-x,o=---), so that users in the group can add and edit their own files while other users can grab copies of the files for their own use. (Sort of a primitive version control server). Thus far, I have been able to make the folder and set the ownership and permissions successfully.

The snag: members of the group can't actually utilize their permissions despite all of the folder settings indicating that they should be able to. I have also checked to make sure that the users are apart of the appropriate group. Thus I am wondering if I need to change some sort of settings or download files that would reactivate these functions.

details:
    Folder:
    drwxr-x--- 2 root group_name 4096 Aug 22 16:25 group_folder

    Group membership:
    group_name:x:1015:usr0,usr1,usr2,usr3

    Access problem:
    usr0@computer:~$ ls -l /usr/share/group_folder
    ls: cannot open directory /usr/share/group_folder/: Permission denied

I run into the same problem if I try to access the folder through the GUI, and the problem persists if I change the owner to something like user2 or set it up in a users home directory.

I will be thankfull of any suggestions.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Bo Elliot Miller
Solved:
Last query:
Last reply:
Revision history for this message
Thomas Krüger (thkrueger) said :
#1

What you have been configured is a folder to which the user root has full access (the 7) and the members of "group_name" have read access to (the 5). Other user have no access (the 0).
If you want your group to have access you need to set the mask to 7 for them and if the other should have read access they need a 5.
That would result in 775 or drwxrwxr-x.
If you want to restrict some rights on the Folder you might want to set the sticky bit http://en.wikipedia.org/wiki/Sticky_bit. Per user permissions have to be set on the files/subfolders directly.

For your access problem: You have to make sure that you re-login. Without it new groups settings will not be active. Also check the current groups of the user with the command "id"!
Also note that your example shows once "usr0" and then "user0".

Revision history for this message
Bo Elliot Miller (millerbe31) said :
#2

Thanks Thomas. I restarted the system as a part of the weekly system update, and after logging in, things seem to work as intented. The "user0" vs. "usr0" thing was just a typo, but thank you for catching it. I have fixed it. I will look into the Sticky bit option as well.

It seems rather silly that all I needed to do was restart my user session, but I had a sneeking suspiscion that this was a simple stupid check.

Thanks again Thomas.