Current Status

Actively playing with all possible backend services

09 September, 2011

linux Directory permissions what real means of x


As i faced you might facing difficulties when understanding "X" permission for directory in linux. Read following and get some idea:

In *nix systems directories are also files and thus use the same permission system as for regular files.  Note permissions assigned to a directory are not inherited by the files within that directory.
Because directories are not used in the same way as regular files, the permissions work slightly (but only slightly) differently.  An attempt to list the files in a directory requires read permission for the directory, but not on the files within.  An attempt to add a file to a directory, delete a file from a directory, or to rename a file, all require write permission for the directory, but (perhaps surprisingly) not for the files within.  Execute permission doesn't apply to directories (a directory can't also be a program).  But that permission bit is reused for directories for other purposes.

Execute permission is needed on a directory to be able to cd into it (that is, to make some directory your current working directory).

Execute is needed on a directory to access the inode information of the files within.  You need this to search a directory to read the inodes of the files within.  For this reason the execute permission on a directory is often called search permission instead.

You can think of read and execute on directories this way:  directories are data files that hold two pieces of information for each file within, the file's name and it's inode number.  Read permission is needed to access the names of files in a directory.  Execute (a.k.a. search) permission is needed to access the inodes of files in a directory, if you already know the file's name.

extracted from :http://content.hccfl.edu

Some Popular Posts