Apache + Php server, file folder owners and user groups
I've apache 1.3 and php5 server (CentOS 4) with proftpd.
Apache runs at User: apache, Group: web
User directories like this
/home/xxx.com/public_html (User: xxx.com, Group: web - and all subfiles,subfolders)
/home/yyy.net/public_html (User: yyy.net, Group: web - and all subfiles,subfolders)
And I've proftpd server. All users have their own ftp access to only their homes.
Everything works great. But I've two questions.
1) When i upload a file with php over apache, uploaded files owner are apache, group are web. Apache's user and group. How can i change it's owner to xxx.com or yyy.net after upload? Or is there any other solution ?
Suexec: If i run apache with site's users (xxx.com user for /home/xxx.com, and yyy.net user for /home/yyy.net) all scripts will have write and delete access at their site. So that i don't need to chmod folders to 0777 for reading and writing. Site panels (plesk, cpanel vs..) are different.
2) All sites have the same group, so i can read all files. I can access xxx.com's files from yyy.net. How can i disable this?
Last edited by Seregwethrin; 03-10-2008 at 04:36 AM.