Do you have to have execute on a directory to be able to view contents in it?
hi guys im a little confused
read privilege on a directory means i can list the contents write means i can save,edit and delete files in that directory but then it says execute is like a light switch,if its off (no execute) you will not be able to view items in the directory so do you have to have rwx on a directory to be able to use it fully? if you have rw- as the owner will you not be able to view or change into subdirectories within that directory? |
Yes
|
Yes. Although it occupies the 'execute' bit location and is shown as 'x' in most listing tools, it is not actually 'execute' in directory context.
Think about it - you cannot 'execute' a directory - it must mean something else! It is often called the 'traversal' or 'cross' bit in some Unix texts - cross fitting well with the 'x' symbol. What it means is that you can read meta data from within the directory, effectively meaning that you can traverse, or cross the directory boundary. But alas, everyone does still call it the execute bit. |
I perceive it to be execute because directories are a special kind of file, but a file still.
the execute permits executing of code which is likely nothing more then pointing names to inode locations Could be I'm way off, but it helps me to understand :P |
I look at it this way, to open a directory you have to 'execute' it and so you have performed an action on it but you have n't writen to it because this inode/file is just a container.
Fred. |
Quote:
|
as always, thanks guys...
|
All times are GMT -5. The time now is 10:35 PM. |