Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Fixing File and Folder Permission on suPHP  (Read 1916 times)

0 Members and 1 Guest are viewing this topic.

dustin

  • Guest
Fixing File and Folder Permission on suPHP
« on: January 04, 2014, 12:27:39 pm »
After installing suPHP on server, the directories which is having the permission more than 755 and files which is having more than 644 will not work in the browser. The browser will show the Internal server error.
For fixing the suPhp error, you can use the following scripts.
1. find /home/*/public_html -type d -exec chmod 755 {} \;
This command fix all folder permission
2. find /home/*/public_html -name '*.php' -o -name '*.php[345]' -o -name '*.phtml'| xargs chmod -v 644
This command fix all file permission
3. Create a file with the following content and give the executable permission.
#!/bin/bash
cd /var/cpanel/users
for user in *
do
chown -R $user.$user /home/$user/public_html/*
done
This script fix all ownership i

====