Re: File and Directory Ownership Question

From: Date: Sun, 20 Dec 2009 18:22:38 +0000
Subject: Re: File and Directory Ownership Question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-300612@lists.php.net to get a copy of this message
On 12/20/2009 1:06 PM, Ashley Sheridan wrote:
On Sun, 2009-12-20 at 12:58 -0500, Al wrote:
I've got a PHP script running on a shared host [Blue Host] that creates a directory and writes files in it. The directory and files are "owned" by the site name, not "nobody" as I've always seen on other shared hosts. Anyone have a possible explanation for this? Thanks, Al.........
The files, if created by PHP, will belong to the user and group that your instance of Apache is running under. Some hosts are set up slightly differently, but it's nothing to worry about. Thanks, Ash http://www.ashleysheridan.co.uk
Thanks for the quick answer. On purpose, to add a little security, I set the permissions for 644 to limit access by anything other than PHP scripts. I'd like to put my script above the web space; but it's generally used by folks on shared hosts and some hosts won't provide access there. I guess I'll add an htaccess file to my application's root that prevents access by anything other than my scrip. I've also found several cases, on some hosts, where the directories can be indexed. So all the files are exposed. I've set config files, etc. with a php extension to prevent them from easily being read. Al........

« previous php.general (#300612) next »