I'm having difficulty with groups and permissions.

  • I have user A part of group A that manages a folder F.
  • A second user B part of group B must access folder F and its content.
  • I added user B to group A but every time B tries to access folder F gets the message saying:

    'Permission Denied'. 

Is this the correct way to achieve that or do I need to do something more?

I'm using CentOS 6.4.

  • 1
    Does A group have the execute bit set on this folder ? Can you show us the folder's permissions ? – Vinz Nov 28 '13 at 12:46
  • 1
    Also look at this question in case you haven't logged out since you applied these changes. – Joseph R. Nov 28 '13 at 13:02
  • @Vinz. No If I give ls -ld F I get "drwx------." – Abruzzo Forte e Gentile Nov 28 '13 at 13:54
  • There're no group permissions. Do chmod 750 F and it should be OK. – Vinz Nov 28 '13 at 13:58

What are the permissions, ownership, and groups for folder F? These need to be set such that group A is set as the group on the folder, and the permissions need to allow members of group A access to the folder.


$ ls -ld F
drwxrwxr-x 2 saml blah 4096 Nov 28 08:38 F

In the above example, directory F, notice that the group blah is set, and that the permissions are rwx for the group. This would allow any members of that group access to this directory.


If the above isn't the case then you can adjust the permissions like so:

$ chmod g+rwx F

To change ownership:

$ chgrp blah F
  • @sim. No If I give ls -ld F I get "drwx------. A A". I think that the ownership os to user A. – Abruzzo Forte e Gentile Nov 28 '13 at 13:55
  • @AbruzzoForteeGentile Then you need to alter group permissions for F: chmod -R g+rX F – Joseph R. Nov 28 '13 at 13:58
  • @AbruzzoForteeGentile - Glad this resolved your issue. Please be sure to mark this answer as accepted so that others know your issue's been resolved. – slm Nov 28 '13 at 14:29
  • Done as it should be! – Abruzzo Forte e Gentile Nov 28 '13 at 15:41

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.