Re: R/W files outside the WebServer folder

From: Date: Thu, 08 May 2003 06:52:39 +0000
Subject: Re: R/W files outside the WebServer folder
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146790@lists.php.net to get a copy of this message
At 04:40 08.05.2003, Ken Tozier said: --------------------[snip]-------------------- >I'm sure this is an easy one, but I can't create or access anything >outside my "/Library/WebServer/" folder from PHP. I read the >permissions documentation but it hasn't helped, Could someone explain >how to do the following? > >I created the folder "/users/testuser/desktop/test_folder" on my Mac >desktop, chmoded it to 0777 and want the ability to create both files >and folders inside this folder. --------------------[snip]-------------------- This usually happens when the user the webserver runs as doesn't have permission to the directory tree. Setting rights to the folder alone will not help if the webserver cannot access (read/traverse) any folder below. In your example, assuming the webserver is prohibited reading the /users/testuser folder, it couldn't advance to ./desktop/testfolder even it had valid permissions there. Hint - usually user home folders have access limitations for the user only, or maybe user and group, but lock out the rest of the world. In X speak this would mean either mode 700 or 770, where you'd need at least 705 or 775 to let "world" read and traverse your tree: Now: 555 /users root:root 700 ./testuser testuser:testuser 700 ./desktop testuser:testuser 777 testfolder testuser:testuser Change to: 555 /users root:root 705 ./testuser testuser:testuser 705 ./desktop testuser:testuser 777 testfolder testuser:testuser Caution: the whole world will be able to read this tree, though no modifications will be allowed. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#146790) next »