If you recently changed your PHP handler to suPHP from mod_php or DSO, then you need to CHMOD all your folders, its sub-folders, sub-sub-folders, and so on to 744 to avoid any internal server errors, specifically internal server 500 errors.
And also, you need to CHMOD all of your files to 644.
In order to do this automatically, login as root in your server and go to your home directory, then enter this command via SSH.
For folders:
find {path to the folder} -type d -exec chmod 755 {} \;
For files:
find {path to the folder} -type f -exec chmod 644 {} \;
And that’s it! It will change the permissions of all your files and folders under your home directory automatically! It’s like magic!
If the above method doesn’t work for you, try the xargs method.
For folders:
find . -type d -print0 | xargs -0 chmod 0755
For files:
find . -type f -print0 | xargs -0 chmod 0644
Leave a Reply