Correcting ownership of all cPanel Users

If you mess up with the ownership of all the users on a cPanel server, following script will help you to correct the ownership:

#  for i in `cat /etc/trueuserdomains | awk ‘{print $2}’`
> do
> /bin/chown $i.$i /home/$i -R;

> /bin/chown $i.mail /home/$i/etc -R;
> /bin/chown $i.nobody /home/$i/public_html;
> done;

The ownership of the home directory of a user, etc and public_tml will be corrected in a one go.

This entry was posted on Monday, September 28th, 2009 and is filed under Scripts. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.