troubleshooting Question

Permissions issues and sub-domains in Apache/PHP

Avatar of rtuplin
rtuplin asked on
Apache Web ServerMySQL ServerLinux Distributions
4 Comments1 Solution484 ViewsLast Modified:
Hi there,
Im new to apache and am stuck with several issues, hoping somebody can offer us some advice.

At the moment we cannot CH mod folders through PHP scripts and need the htdocs folder CHMOD'ing in FTP to 777 or 755 to create folders through PHP scripts. Also when PHP creates a file/folder or one is uploaded the owner is "PHP" and we cannot delete or edit contents/folders from FTP - how can i change the permissions for this as when a file or folder is created by a PHP script, FTP should have permission to edit, delete and create still. Also vice versa, PHP needs to be able to edit, delete and create files and folders created in FTP.
 
 Finally, how do we create subdomains from PHP scripts?
 
We need to be able to create a subdomain automatically, based on their input (i.e. xyz.domainname.com).  Once the script has set up a subdomain, it will copy the PHP files from a storage location over and create a config.php file dynamically.
 
Basically we need the server to be able to support this:
http://forums.digitalpoint.com/showthread.php?t=53570

Or can anyone suggest a better way of doing it dynamically from code?
 
The server is a dedicated server and i have full remote, root access. It is running Red Hat Linux.  Any help would be appreciated as we're on an urgent deadline! Whats new!!! Im happy to allocate decent points to individual answers if you can only answer one part of this - but i'll allocate them at the end.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros