Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Script for changing permission for all users in cpanel  (Read 4187 times)

0 Members and 1 Guest are viewing this topic.

vinodt

  • Guest
Script for changing permission for all users in cpanel
« on: October 30, 2013, 07:25:42 am »
1.Script for changing all account permission to default in cPanel:
========================================================================
for x in `ls /var/cpanel/users` ; do find /home/"$x"/public_html/ -type d -exec chmod -v 755 {} \;; find /home/"$x"/public_html/ -type f -exec chmod -v 644 {} \;; chmod -v 750 /home/"$x"/public_html ; chown -vR $x:$x /home/"$x"/public_html ; chown -v $x:nobody /home/"$x"/public_html ; echo "Permission Changed For: $x " ; done
=======================================================================

Regards,

Vinod T K