set correct ownership to all accounts

How to set correct ownership to all account on the cPanel server. You can use the following commands to set the correct ownership for all accounts which is hosted on the cPanel server.

===============================

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;

===============================

Leave a Reply

September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930