Reset default permissions cpanel accounts

Running these from SSH one by one should work;

for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:$CPAccess /home/$CPAccess; done

for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:mail /home/$CPAccess/etc /home/$CPAccess/mail; done

for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:nobody /home/$CPAccess/public_html; done

/scripts/chownpublichtmls

Depending on how you're setup you might need these:

find /home*/*/public_html -type d -perm 0777 -exec chmod 755 {} \;
find /home*/*/public_html -type f -perm 0666 -exec chmod 644 {} \;

To take care of one users account this may be all you need.

chown -R usernamehere:usernamehere /home/user/public_html/* ;

Don't run any of them if you're unsure what you're doing. 
 
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Run OPTIMIZE TABLE to defragment tables for better performance

For this suggestion:Run OPTIMIZE TABLE to defragment tables for better performanceRun this...

How to clear Error Log of a cPanel Account.

User the below code to clear Error Log:Replace User with Username:Code:for i in `find...

What is php.ini ?

The php.ini file and changing PHP Settings The php.ini file is a special file for PHP and...

How to fix ini_set() has been disabled for security reasons

1. Create php.ini file inside your public_html folder, OR the folder in which you have...

How to fix Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone:

1: Create .htaccess file inside your public_html folder, OR the folder in which you have...