Wednesday, May 13, 2015

Reset or Set Default Permissions to Domain for Files and Directories in cPanel

If your permissions are incorrect for files and folders in a webroot domain more than likely you’ll get a server 500 error. Here is how to fix them by resetting, especially using the correct defaults for a cPanel domain or other web server for files and directories.


You can bulk fix these permissions on the command line, with these commands:
cd /home/yourdomain/public_html/
 
Go to your webroot directory

find . -type d -exec chmod 755 {} \;
 
Fix the permissions on directories

find . -type f -exec chmod 644 {} \;
 
Fix the permissions on files

Sunday, May 10, 2015

Symlink find

find /home*/*/public_html -type l >> /root/symlinks.txt