here is the directory listing:

drwxrwSr--. 31 storage storage 4096 Nov 20 23:12 storage

id returns uid=501(peter) gid=501(peter) groups=501(peter),504(office),505(www),506(storage),507(media)

looks ok? but when I try to enter this this I am getting

-bash: cd: storage: Permission denied

What am I doing wrong?

I want to make dir storage accesible (read) for everyone, and writes should be allowed only for users from storage group. Also I want new files to be created with storage group by default

  • why downvote???
    – user21886
    Nov 21, 2013 at 10:51

1 Answer 1


Not everybody can read if your directory doesn't have world execute access, so first you need to

$ sudo chmod o+x storage

Furthermore, I don't know what the capital S mode means, never seen it like that, but I think that is where your problem lies; the setuid bit should be a lower case s. if that is the sticky bit, remove it and set it to normal:

$ sudo chmod 0775 storage

(Sudo not necessary if you can log in as storage).

// EDIT To have new files default to storage group, you need to add the setuid bit.

$ sudo chmod g+s storage

Another cause for your problem may be that while id gives you the correct output, your shell isn't updated. If you added yourself to the storage group in this session, make sure to log out and log back in again to make your shell aware of the change.

  • I didn't know about I need execution access to list dir contents
    – user21886
    Nov 21, 2013 at 11:21
  • Ah! That's one thing to never forget! To execute a directory means to be able to look what's inside!
    – Pelle
    Nov 21, 2013 at 11:27

You must log in to answer this question.

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