I have a folder that has the following access permisions:

drwxrw-rw- tator nogroup 4096 jun 11 15:20 main

As you can see I have chmod it to 766 and it is owned by tator.

But when I tried to access to that folder on a service that is running on different account it gets permission denied. My service can get to all the folders that are levels above "main" folder but it cannot access "main" folder despite my chmod command.

How can I allow this folder to be accessible by any users?


You need the execute permission on directories to view them. Try chmod 777 on the folder.

  • So I need to grant Execute access for read?? Then what good does granting read do?
    – Anatoli
    Jun 11 '13 at 15:51
  • Read this: hackinglinuxexposed.com/articles/20030424.html
    – snapshoe
    Jun 11 '13 at 16:06
  • 2
    chmod 777: nonononono! Never ever run chmod 777. It is practically never required! Not even for "testing purposes". If the file is readable, then it's readable. If it's writable by the user or group that need to write to it, then it's writable. There is absolutely zero need to give everyone write permissions, and forgetting to chmod it back to something sane is exactly how multinationals get hacked. Just don't do it. Ever. I wrote an introduction of Unix permissions. Please read it! Mar 13 '16 at 6:10

To access a folder, the user / group need to have the x flag on it.

So, in your folder, you would need one of the following:

  • to set the x flag to the group / anybody , so it becomes a drwxrwxrwx

  • change the owner of the folder to the process you're trying to execute

  • put the user of the process you're trying to execute in the group, and give the group the x flag

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.