Ownership wrong for cPanel users.

Sometime when we migrate the servers by using rsync we face ownership problems for cPanel users files/directories. At that time we can use following command from shell to resolve issue within few minutes.

——

for i  in `cat /etc/trueuserdomains   | awk ‘{print $2}’`
do
chown $i.$i /home/$i -R;
chown $i.mail /home/$i/etc -R;
chown $i.nobody /home/$i/public_html;
done;

—–

 

 

Make sure that you are using root login details to run above command.

Both comments and pings are currently closed.

Comments are closed.