suPHP

I did find a lot of files and directories that had insecure permissions with
this account. I changed the files to have 644 permissions and the directories
to have 755 permissions. This is how the suPHP handler would like things to be
set, but they can have files at 755 as well if they need to be.

I ran these commands to find files and directories and replace permissions
with correct permissions:

This is for files and you would replace user with the actual user account:

find /home/user/public_html/ -type f -perm 777 -exec chmod 644 {} \;

This is for directories and the same applies for the user:

find /home/user/public_html/ -type d -perm 777 -exec chmod 755 {} \;

I did find some files and directories with 775 permissions which would need to
be changed as well. You can change the "-perm 777" to be whatever
permission you are looking for like 775 and then it will change those to the
proper permissions should those permissions be present in the future. As it is
though, this should be all set and the permissions on the files and folders
should be secure now.
  • 0 Users Found This Useful
Was this answer helpful?