Reason Execute Bit Is Needed For Directories?


Recommended Posts

I drove myself crazy earlier not being able to play some video files, or more correct, read some files as regular user. The problem was I ran chmod 664 recursively on my media directory. It was pointed out to me that regular users need 755 set on directorys to read the contents. Is their a security reason that non root users can't read the contents of directorys that are not set with the execute bit(even if they own them)?

Link to post
Share on other sites

yes, it's called discretionary access control

it allows an admin (root) to set directories so to a level so that application can not be run. (so a Trojan installs in a folder but the user can not run it)

you should be able to read the folder, but not run anything from it. I have never seen this with video as its not run, but I guess the system could see that as an exacutable depending on type.

I'll test it on gentoo..

Link to post
Share on other sites

The execute bit on directories control access to -- not just execution of -- the contents of a directory.

As for why... you've got to do something with the 'execute' bit on directories and traversal control is sometimes useful.

Link to post
Share on other sites

the reason it stumped my for so long is I owned the directory and contents, so I did not see any logical reason I was getting "permission denied" The funny part is I can just change it to executable with out any problem(since I own it). So it is not really any more secure.

Edited by shanenin
Link to post
Share on other sites

yes sorry I'm late on the responce (Kids)

this page explains

http://www.zzee.com/solutions/linux-permis...nk_9_1077830297

Link to post
Share on other sites
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...