Quote:
Originally Posted by
islanderman
I changed the permissions in the directory from 644 to 755 and it works. I don't quite understand why [...]
What you did was to set the "x" bit for the directory for owner, owners group and world. The "x" bit in directory is necessary for the "chdir()" system call to get the files inode number and thus accessing the file.
Suppose you want to access /path_to/file: without the "r" bit on the file you wouldn't be allowed to read it and therefore a "cat /path_to/file" would fail. A "ls -l /path_to/file" might still work though, because even if the
access to the files contents is blocked the
existence of the file is no secret to you.
If the "x"-bit on the directory "/path_to" is missing for your UID you will not be able to do a "ls -l" (or any similar command) on the directory and therefore the access to the file would be blocked for another reason: you will not be allowed to get the inode information necessary to access the file.
For further information you might want to read
Perderabos file permissions tutorial.
I hope this clears things up.
bakunin