Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a directory /models/ with the permissions

drw-rw-rw- 2 owner developers 4096 Jun 24 15:13 models

these were set with

sudo chmod -R 0666 *

My user has developers as the primary group (the same group as the file), but I cannot access the directory via the terminal or ftp.

[myUser@machine]$ id myUser
uid=503(myUser) gid=505(developers) groups=505(developers)
$ cd models 
-bash: cd: models: Permission denied

I had the same problem before the directory belonged to my group, and I even went so far as to restart the server, without any luck. How do I set permissions to this directory so that I and other members of the group developers can access it?

share|improve this question

migrated from Jun 28 '11 at 2:31

This question came from our site for professional and enthusiast programmers.

Directories need execute permission to be readable.

share|improve this answer

Directories need execution rights to be traversable. So, if you set the r flag but not the x flag you can read the directory content but not go into it.

share|improve this answer
up vote 0 down vote accepted

"executable" flag for directories means you can list the contents of that directory, so enable the executable flag:

chmod 777 models
share|improve this answer
Thank you- it is strange that all the guides I found on google don't mention this, when it is so simple and (now) obvious. – Jay Jun 27 '11 at 19:22
I haven't yet found a directory that warranted 777 permissions. /tmp and other public directories should be 1777 (set the sticky bit), so that users cannot delete files owned by someone else. But 777 is begging for trouble. – sarnold Jun 28 '11 at 0:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.