Permission error in /home directory running WHM/Cpanel

 

1.Command run as root:

find /home/*/public_html/* -type f -exec chmod 644 {} \;

find /home/*/public_html/* -type d -exec chmod 755 {} \;

for i in $(ls /var/cpanel/users) ;

do chown -R $i.$i /home/$i/public_html/* ; done

2.A script to fix permissions & ownership, on files & directories, for cPanel accounts.

To get the fixperms script, simply wget the file from GitHub and make sure it’s executable:

wget https://raw.githubusercontent.com/PeachFlame/cPanel-fixperms/master/fixperms.sh chmod +x fixperms.sh

Fixing one single user/account

Then, run it (with ROOT permissions) while using the ‘a’ flag to specify a particular cPanel user:

sh ./fixperms.sh -a USER-NAME

It does not matter which directory you are in when you run fixperms. You can be in the user’s home directory, the server root, etc… The script will not affect anything outside of the particular user’s home folder.

Fixperms - for all of the users

If you would like fix the permissions for every user on your cPanel server, simply use the ‘-all’ option:

sh ./fixperms.sh -all

 

Thanks goto NC 

 

  • 0 Usuários acharam útil
Esta resposta lhe foi útil?

Artigos Relacionados

451 Temporary local problem + Squirrel mail

Message not sent. Server replied: Requested action aborted: error in processing 451 Temporary...

Locations of Common Log Files on cPanel Servers

One of the nice things about cPanel based servers is the way that they keep the location of key...

How to flush DNS - windows

I. Flushing DNS Cache in Windows 8: 1. Press the Windows Logo+R keys together and the Run box...

bash: /bin/rm: Argument list too long - Solution

Symptoms This error message appears when you try to remove, move or copy a long list of files....

tuning-primer.sh – an alternative for mysqltuner

Insatllation cd /usr/local/bin wget https://launchpadlibrarian.net/78745738/tuning-primer.sh...