I created a directory in /home and changed its group from root to sharing. Other users in the group sharing are unable to access the directory. I have tried a lot of ways to solve this problem but I am completely stuck now. These are the steps I followed in creating the group and directory.

john@hp:~$ sudo groupadd sharing
john@hp:~$ sudo adduser john sharing
Adding user `john' to group `sharing' ...
Adding user john to group sharing
john@hp:~$ sudo adduser sally sharing
Adding user `sally' to group `sharing' ...
Adding user sally to group sharing
john@hp:~$ cd ..
john@hp:/home$ sudo mkdir sharedMusic
john@hp:/home$ sudo chgrp sharing sharedMusic/
john@hp:/home$ ls -ld sharedMusic/
drwxr-xr-x 2 root sharing 4096 Nov 22 16:19 sharedMusic/
john@hp:/home$ sudo chmod 2770 sharedMusic/
john@hp:/home$ ls -ld sharedMusic/
drwxrws--- 2 root sharing 4096 Nov 22 16:19 sharedMusic/
john@hp:/home$ cd sharedMusic/

Although I am able to enter the directory, the other user sally who is a member of the group sharing is getting this message.

sally@hp:~$ cd ..
sally@hp:/home$ ls -l
total 28
drwx------  2 root    root    16384 Oct 28 13:52 lost+found
drwxrws---  2 root    sharing  4096 Nov 22 16:19 sharedMusic
drwxrw-r-- 23 john    john     4096 Nov 22 11:22 john
drwxrwx--- 15 sally   sally    4096 Nov 22 12:12 sally
sally@hp:/home$ cd sharedMusic/
bash: cd: sharedMusic/: Permission denied

I am the default user with root privileges whereas sally is a regular user with no sudo privilege but she is in the group sharing and hence should have got access in the shared directory. I have given zero permissions to world since I don't want anyone else to have any access to the directory other than the group and root. Help me out!

1 Answer 1


Ok, my problem is finally solved. I just refreshed the terminal and now the users are getting access. Actually I had login into the terminal session of sally and was trying to access the shared directory. I closed the all the terminals, switched to sally's account, and then opened the terminal and got access to it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.