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?
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 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.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php