1

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.

4
  • 1
    Does A group have the execute bit set on this folder ? Can you show us the folder's permissions ?
    – Vinz
    Nov 28, 2013 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, 2013 at 13:02
  • @Vinz. No If I give ls -ld F I get "drwx------." Nov 28, 2013 at 13:54
  • There're no group permissions. Do chmod 750 F and it should be OK.
    – Vinz
    Nov 28, 2013 at 13:58

1 Answer 1

2

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.

Example

$ 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.

Fixes

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
4
  • @sim. No If I give ls -ld F I get "drwx------. A A". I think that the ownership os to user A. Nov 28, 2013 at 13:55
  • @AbruzzoForteeGentile Then you need to alter group permissions for F: chmod -R g+rX F
    – Joseph R.
    Nov 28, 2013 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, 2013 at 14:29
  • Done as it should be! Nov 28, 2013 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .