in reply to Re: Config::Simple value lost on method call, huh???
in thread Config::Simple value lost on method call, huh???

> A directory needs 'x' to allow searching in it.

Nope. A directory needs 'r' to allow searching in it. A directory needs 'x' to allow chdir into it, and 'w' to create an entry in it.

It helps to think of a directory as a structured file (which in <update type="add"> classical </update> unix semantics, it is). Searching a directory is reading it ('r' permissions); changing directories, <update type="add">and accessing or changing the files pointed to by the directory entries</update> is executing it ('x' permissions); and modifying the directory (adding or removing entries in the structured file) is writing it ('w' permissions).

Update: So, if you want to add a new file, you need 'wx' permissions, reading the file names needs 'r', reading the file names and getting to the file itself (done by ls -l - it reads the inode) needs 'rx'. Directories act funny unless you understand what part is managed by each permission bit. Even then it can still be kindof funny.

Updates: Slight modifications after validation

--MidLifeXis

The tomes, scrolls etc are dusty because they reside in a dusty old house, not because they're unused. --hangon in this post

Replies are listed 'Best First'.
Re^3: Config::Simple value lost on method call, huh???
by james2vegas (Chaplain) on Aug 20, 2009 at 16:26 UTC
    you don't need 'rx' to list the files in a directory, just 'r', but you do need 'x' to read into the files (contents, inodes, mtime, etc) if you know the names (which doesn't require 'r' if you know the file name by some other means). There was an example here, but the parent of this note made it redundant.

      I believe that the example you present was unaddressed in my post, but that is ok. The point is that the 'rwx' semantics on a directory are not necessarily intuitive when you start deviating from the "standard" 'rwx' and 'rx'.

      Back to the OP - the directory permissions look funky. Look into those.

      --MidLifeXis

      The tomes, scrolls etc are dusty because they reside in a dusty old house, not because they're unused. --hangon in this post