How to change permission of all files and folders in Cpanel together. Its little tricky. We can do this job easily using cpanel cron jobs function.
- Login to your cpanel and click on cron jobs
- Then select ‘common settings’ as ‘Once per minute(*****)’
- Now add one of the following command into command input box
- Wait for a couple of minutes and enjoy to fix the permission issues
- All folders are 755 and files are 644
Command
cd /home/username/public_html ; find -type f | xargs chmod 644 ; find -type d | xargs chmod 755 ; chmod 750 . -c
or
cd /home/username/public_html ; find ./ -type f -not -perm 644 -not -name “.ftpquota” -exec chmod 644 -c {} \;; find ./ -type d -not -perm 755 -not -group nobody -exec chmod 755 -c {} \;
Leave a Comment
You must be logged in to post a comment.