Re: standard safe permissions for php scripts in web directory

From: Date: Thu, 13 Nov 2008 23:32:09 +0000
Subject: Re: standard safe permissions for php scripts in web directory
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-283272@lists.php.net to get a copy of this message
Noor Ahmed Afridi wrote:
Sounds like a weird question though :( what should be standard safe php script/directory permissions under Apache.
I don't understand the question. For the php scripts themselves or for stuff that the php scripts action (eg create dirs/files) ? It depends on the setup. If php/apache is running in cgi mode, the php scripts should be owned by the user. Eg website is running as user 'mydomain'. The php scripts should be owned by that user, otherwise you'll get errors about a mismatch of user and the script won't execute. If php/apache is running in isapi mode (apache runs as user 'www' or 'www-data' or some such variant), then apache will need read access to the file(s) and folder(s) but not 'write' access (of course unless you're writing to some files). -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#283272) next »