Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: access mode of a directory



On Mon, Jul 02, 2001 at 01:48:18PM +0900, A.Sajjad Zaidi wrote:
> Hector Akamine wrote:
> 
> > Hello,
> >
> > I have a doubt about directory permissions. If I set the access mode of
> > a directory to 711 (drwx--x--x), can the files of the directory be
> > accessed by the members's of the group? In the case of a directory,
> > what is the difference between 711 and 700?
> 
> 711 allows owner to 'read, write and execute' and group and others to only
> 'execute' anything inside the directory. 700 only allows the owner to
> 'read, write and execute'.

Execute perms on a directory translate to being able to access any files
under that directory. Without read perms also you won't be able to get a
directory listing of that directory though, but you will be able to 
access files and directories underneath it depending on their permissions.
A directory with read only permissions is not much use, but a directory
with execute only permissions is pretty useful.

$ mkdir t
$ echo "hello" > t/z
$ ls t
z
$ chmod 100 t
$ ls t
ls: t: Permission denied
$ ls t/z
t/z
$ cat t/z
hello
$ chmod 400 t
$ ls t
ls: t: Permission denied
$ ls t/z
ls: t/z: Permission denied

The same applies for group/other permissions.

Tom.
-- 
Thomas O'Dowd. - Nooping - http://nooper.com
tom@example.com - Testing - http://nooper.co.jp/labs


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links