I had a user john in fedora 19

usergroup marygroup
useradd -g marygroup mary
usermod -a -G marygroup john

In John terminal:

cd /home/mary

Permission denied

cd /home

ls -l
drwx------. 11 john john
drwx------. 11 mary marygroup
logged into as root
chmod 770 /home/mary
ls -l
drwx------. 11 john john
drwxrwx---. 11 mary marygroup

still cannot do cd Permission denied why?


By executing chmod 770 /home/mary all you did was set Read-Write-Execute permission for the Owner User and Owner Group of /home/mary folder (which is mary and marygroup).

If you want to access mary's home as john, you need to add user john to group marygroup:

$ gpasswd -a john marygroup`

For this to take effect, you will have to relogin as user john.

  • Thanks,Then why the following command will not solve the problem. usermod -a -G marygroup john. Upto my knoweledge it is also adding to the supplementary groups.What is the difference between the 2 commands. – Curious Apr 25 '14 at 12:53
  • You need to relog with user john for new groups to take effect. – phoops Apr 25 '14 at 12:58

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.