in reply to Re^4: Why Perl misses installed modules ?
in thread Why Perl misses installed modules ?

I'm sure I'm right with this. This was the way on Solaris and when I use 'man 2 chmod' on linux, I find the following sentence (translated from german):

S_IXOTH 00001 Execute rights for others, on directories: others + are allowed to search directory

I also used this effect a few times to make dirs unreadable, but allowed the files in it to be read (security by obscurity, but better than nothing).

UPDATE: Sure I was, but wrong. As wrong as the man page.

Replies are listed 'Best First'.
Re^6: Why Perl misses installed modules ?
by rowdog (Curate) on Sep 26, 2008 at 12:17 UTC

    I'm afraid ikegami is right on this one. For me, the magic of modes is one of the most confusing areas in *nix.

    jth@reina:~/tmp/t$ ls -l total 8 dr--r--r-- 2 jth jth 4096 2008-09-26 06:42 r d--x--x--x 2 jth jth 4096 2008-09-26 06:42 x jth@reina:~/tmp/t$ ls r ls: cannot access r/file: Permission denied file jth@reina:~/tmp/t$ ls x ls: cannot open directory x: Permission denied jth@reina:~/tmp/t$ cat r/file cat: r/file: Permission denied jth@reina:~/tmp/t$ cat x/file contents of x/file

    As you can see, r lets me list the file with ls (read the directory) but not access the file while x lets me access the file ("search") but not list the directory.

    Don't feel too bad, I've been messing with modes for about 15 years and I still had to test to see who was right. Besides, you are completely correct when you say that one would almost always want rx on a directory.

Re^6: Why Perl misses installed modules ?
by ikegami (Patriarch) on Sep 26, 2008 at 21:30 UTC
    I tested my claims on a linux system before posting. Maybe it's different on Solaris? (wow if true!) But it's more likely that "search" is a very poorly chosen name, because "r" is "read" for both files and directories. Linux refers to "x" on directories as "access".