On Thursday 05 June 2008 11:45, Fargusson.Alan wrote:
>You got it backwards.  See how confusing this is?
>
>$ ls -ld x
>dr-x------ 2 f4185 users 4096 Jun  5 08:41 x
>$ ls x
>data
>$ cat x/data
>Thu Jun  5 08:41:36 PDT 2008
>$ chmod 400 x
>$ ls -ld x
>dr-------- 2 f4185 users 4096 Jun  5 08:41 x
>$ ls x
>data
>$ cat x/data
>cat: x/data: Permission denied
>$ chmod 100 x
>$ ls -ld x
>d--x------ 2 f4185 users 4096 Jun  5 08:41 x
>$ ls x
>/bin/ls: x: Permission denied
>$ cat x/data
>Thu Jun  5 08:41:36 PDT 2008
>$

Whoa!  You're right!  I knew I should have tested that before sending my
reply.  I guess the 'r' bit means that you can do an open(2) on the
directory, and the 'x' means that the path_resolution(2) algorithm can be
performed on it.

So you would use the 'r' bit to allow the directory to be listed but prevent
access to files within it.  Or the 'x' bit to make files that can be accessed
only if you already know their full names.  I'm not really sure why you'd
want to do that, but I suppose the 'x' bit had to mean *something* for
directories.

I guess I'm more than "just a bit off", more like a few bytes off this
time. ;-)
        - MacK.
-----
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to