I have a pretty garden-variety linux server. I have some websites for customers set up on it. Each website is a user in linux, cpm001, cpm002, cpm003, etc. (my company is Compass Point Media). Each website is found in the /home directory under their username:
/home/cpm001/public_html/.
/home/cpm002/public_html/.
and I have php running on the server.
HERE IS THE PROBLEM:
There is nothing from stopping cpm001 from using require() like this to get another user's sensitive information:
//this could be called by cpm001:
require('/home/cpm002/public_html/config.php');
//they now have access to the vars in that file:
echo "Aha! cpm002's password is $MASTER_PASSWORD !";
All of the files in cpm001 folder belong to cpm001 (or sometimes root but I manage those). seems there is a directive in php.ini that restricts the require() function to ony allow files inside the root folder of the owner of the file. Am I correct on this? Otherwise I see a huge security hole. Please help, and thanks in advance!!!!
Samuel Fullman