User Dir Home Folder Permission?

young

Verified User
Joined
Oct 22, 2003
Messages
84
i just moved a website from one virtual dedicated server using sphera to a virtual private server using directadmin.

on the old server i had one account and many websites under the same account. on the new server i have the admin account and i created 2 reseller accounts to separate the many websites.

on the old server i had php nuke and most of the files in the nuke folder were 700 permission. after i copied the files to the /domain/name.com/public_html/ i started apache "You don't have permission to access" errors. i recursively chmod'd the nuke folder to 755 and everything seems to work. before the recursive chmod some files had different permissions, but after the files had the same permission. if i want the files to keep the original permision, i would probably have to chmod each file.

is there a way to leave the permission at 700 and have it work?
is there any other way to solve the "You don't have permission to access" errors with out chmod'ing?
maybe by changing something in the apache UserDir directive?

i also noticed after an upload script would save files into a directory the files created would have the user:group == apache.
how can i make the user:group == reseller/user name?

Which permission would allow apache to show public_html files but keep other users from reading other user' files?
i dont want one user going into another user's public_html and vi'ing their config.php containing passwords.

keywords: userdir user home chmod folder 700 permission
 
Last edited:
Hello,

Apache runs as user "apache", not higher. If it's supposed to show your files, it needs to be able to read your files. If those files are only readable by your user (chmod 700) apache won't be able to read them.

The only way to get apache to read them would be if it's running privileges was change to that of your user using suexec, which is done when executing cgi's in the cgi-bin. However, I'm unaware of any method to do that in apache for the regular website.

To upload files to save as user:group, you'd need to execute your script from the cgi-bin.

The most secure method is to use scripts in the cgi-bin, that way you can chmod them to 700.

John
 
Back
Top