Permission issues after cPanel transfer.
First off, I'm not a complete newb, but I'm not a Linux guru either. I'm familiar to Linux I suppose.
I just did a server switch from a shared host to a VPS, and I used WHM/cPanel automatic transfer feature. It totally ruined the permissions on the site.
The process set everything (files and directories) to 755, and the owner and group to the username associated with the hosting account.
Scripts could no longer write, because Apache runs under the owner and group "nobody".
So I use the chown command to set the owner and group to nobody.
>cd home
>cd username
>chown -R nobody:nobody public_html
Great, everything works on the site. But now I can't use FTP anymore, the account no longer has permission to write to any of the files.
I need to be able to write, I use FTP for a number of operations to update and modify the site.
To get around it for now, I have set owner to username, group to nobody, and directory permissions to 775 and file permissions to 644.
But I still have write errors here and there, and different owners and groups for different files (because they are created on the web site, and assigned to the owner and group nobody).
What can I do to set it up so that I can set the owner and group to "nobody", but still be able to write via FTP as a different user?
I desperately need consistency... 755 for all directories, 644 for files, nobody:nobody, work on the site from FTP (Dreamweaver, FTP client).
Advice?
|