View Single Post
Old 05-01-2008, 01:48 PM   #1 (permalink)
metazai
Regular Contributor
 
Join Date: Apr 2004
Location: Orange County, CA
Posts: 123
metazai is on a distinguished road
PHP and ownership

Trying to understand something about a LAMP site I'm working on -- slightly related to my last post but a new issue.

How do you determine ownership of a file or directory when it's created using PHP? Is it fixed to the method, or can a specific owner be assigned? Case in point:

My CMS creates directories and files, depending on what's being done. According to a list from the host, the things created have an owner name of httpd:httpd, while the thing that have just been ftp's have an ownername of the domain name, so for privacy purposes I'll just call it domainname:domainname. So now I can't delete, edit, or change permissions unless I write a script to do it, and it gets even worse. They moved the site to another server, and now I can't even seem to do that, I guess because I'm coming from yet another owner name on the new server. DOes the host have to straighten this out? I know there's a chown() function but I don't know much about it except that you have to be a superuser to use it.

Any thoughts?
metazai is offline   Reply With Quote