
Originally Posted by
Kurieuo
Old post, but... if you're still around... did you manage to come across something like what you were after?
I hate the 'nobody' user being created. I found nifty code here which allows easy chowning of users to their own user name, which I thought was great, however I have since realised this actually breaks some installed CMS' and the like which then attempt to rewrite as nobody the same files = invalid permissions = more support needed.
So, I really, really desire to go suexec, but need a step-by-step migration plan that is successful which will reduce the impact upon my 350+ hosted clients.
I found a file/folder changing permissions. But then there is the conversions of .htaccess commands I believe into php.ini that would likely be required... and anything else I am not aware of which could break peoples scripts.
Still doing my searching, so hopefully I will come across something. But in the event I don't, does anyone know if something like this is around? I can't express how much I'd appreciate it.
Unless you have a lot of customizing going on, you'll probably be fine. The EA3 script has come a long way and takes many things into concideration when run.
These may be helpful to you to make sure all goes well.
Code:
Set owner of all user files
Also you can run the following to ensure all users files are correctly owned.
You can do this running the following commands in shell as root;
for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:$CPAccess /home/$CPAccess; done
for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:mail /home/$CPAccess/etc /home/$CPAccess/mail; done
for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:nobody /home/$CPAccess/public_html; done
Code:
Set permissions of all user files
find /home*/*/public_html -type d -perm 0777 -exec chmod 755 {} \;
find /home*/*/public_html -type f -perm 0666 -exec chmod 644 {} \;
Code:
Find htaccess file with php_flags in them.
find /home -name '.htaccess' -exec grep -i 'php_' {} \; -print
find /home -name '.htaccess' -exec grep -i '' {} \; -print