Inherently, a directory is a file that stores information about files that
are ``inside''. It has the same permissions as a regular file. However,
there are some important differences.
- Read. If a directory is readable, the files contained in the
directory are listable. However, this does not mean that the files
can be read.
- Write. If a directory is writeable, its content can change. In other
words, new files can be created, and existing files can be
removed.
- Execute. If a directory is ``executable'', its content can be
read.
Special care should be taken when setting the r
and x
permissions. r--
for a directory means the contained files
can be listed, but there is no access to them. --x
is usually
not used, but it means files inside a directory can be accessed, but
the directory cannot be listed.
Copyright © 2006-07-31 by Tak Auyeung