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.
Comments are closed.