Reputation: 1
I log in as root and I issue the following command:
ls -l /home/osr/public_html/include/connect.php
and I receive
-rwxrwxr-x 1 osr epanagio 578 Jul 10 2012 /home/osr/public_html/cti/include/connect_to_md5.php
This tells me that "osr" and "epanagio" can access the file for read-write-execute.
Now I log in as "epanagio" and I issue the same command:
ls -l /home/osr/public_html/include/connect.php
and I receive
/bin/ls: cannot access /home/osr/public_html/include/connect.php: Permission denied
WHAT?! I am "epanagio" and according to the permissions I have rwx to this file.
I am using CentOS and I am obvioulsy lost. Can someone PLEASE explain this to me?
Upvotes: 0
Views: 146
Reputation: 360642
Just because you have the rights to read a file doesn't mean you can actually REACH that file. You need permissions to access all of the parent directories of wherever that file is.
Consider it the equivalent of giving you permissions take a $1 bill from me, but that $1 bill is inside a safety deposit box in a bank's vault. You have the rights to the money, but no rights to walk into the vault and open the box.
Upvotes: 1