On Sat, 24 Jun 2006, Brian Foster wrote:
> fscked. my guess is yer missing the appropriate eXecute permission
> (which for dirs means search, i.e., scan thru a dir for a file, and
To be pedantic:
eXecute on a directory prevents /traversing/ that directory (ie
access to any pathname below the directory is disallowed). One can
still read the contents of a directory though, if one has 'Read'
permission:
$ ls -ld /tmp/testdir/
drwxr-xr-- 2 root root 80 Jun 25 03:34 /tmp/testdir/
$ ls -l /tmp/testdir/
total 0
?--------- ? ? ? ? ? bar
?--------- ? ? ? ? ? foo
$ cat /tmp/testdir/bar
cat: /tmp/testdir/bar: Permission denied
Note how read perms allows the directory to be read (ie get a list of
files in that directory) but does not allow the files to be accessed
in any way (e.g. stat(), open(), etc.).
And other way around, a directory without read permission disallows
the directory from being read (so you can't list the files in the
directory), but with execute set one can still access pathnames below
the directory (if one already knows the pathname some other way, as
you can't learn it from the directory):
$ ls -ld /tmp/testdir/
drwxr-x--x 2 root root 80 Jun 25 03:34 /tmp/testdir/
$ ls -l /tmp/testdir/
ls: /tmp/testdir/: Permission denied
$ cat /tmp/testdir/bar
baz
$ ls -l /tmp/testdir/bar
-rw-r--r-- 1 root root 4 Jun 25 03:34 /tmp/testdir/bar
regards,
--
Paul Jakma paul at clubi.iepaul at jakma.org Key ID: 64A2FF6A
Fortune:
Maybe ain't ain't so correct, but I notice that lots of folks who ain't
using ain't ain't eatin' well.
-- Will Rogers
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!