Correct Permission Problem In Suphp

With Suphp, you can’t have any files or folders with permissions greater than 755. Otherwise, you will get a Internal Server Error. There could be other reasons for that error. You must check the apache error_log. In Centos, you will find that file in /usr/local/apache/logs/error_log.

Confirmed the permission problem, a easy fix is to ssh to the server. Access the public_html folder of the account. And run these commands:

find . -type f -exec chmod 644 '{}' \;
find . -type d -exec chmod 755 '{}' \;

If you don’t have ssh access to your shared hosting account, upload a php file to the public_html directory and call the file in the browser. Include this code in the php file:

<?
shell_exec("find . -type d -exec chmod 755 {} \\;");
shell_exec("find . -type f -name '*.php' -exec chmod 644 {} \\;");
?>
This entry was posted in Apache Administration, Cpanel Administration and tagged . Bookmark the permalink.

17 Responses to Correct Permission Problem In Suphp

  1. Hi there. I noticed your website title, “Correct Permission Problem In Suphp | Web Hosting Tutorials” doesn’t really reflect the content of your web site. When writing your site title, do you believe it’s best to write it for Web optimization or for your viewers? This is one thing I’ve been battling with because I want great search rankings but at the same time I want the best quality for my visitors.

  2. Rui Soares says:

    Gostei muito do tutorial. Os comandos shell são muito úteis para corrigir permissões.

  3. catalog says:

    I do enjoy the manner in which you have framed this specific matter and it does supply me a lot of fodder for consideration. However, through what precisely I have observed, I just trust when the actual feed-back stack on that people stay on issue and in no way embark upon a tirade of the news du jour. Anyway, thank you for this excellent point and whilst I do not really concur with the idea in totality, I regard the viewpoint.

  4. Terrah says:

    3TZ9UH That’s really thinking out of the box. Thanks!

  5. Hi! I just want to give a huge thumbs up for the impressive information you have here on this weblog. I am coming back to to your blog for more soon.

  6. Tim Wicks says:

    hello blogger, i was reading your posts on Correct Permission Problem In Suphp | Web Hosting Tutorials and i actually liked them. one issue that i noticed whilst browsing through your blog that some of the links aren’t working and giving error. this makes the reading experience a little bit bad. you have a good blog and i would request you to revise the links so that fascinated folks can get all the info they want to have. Btw are you on twitter?? i would really like to follow you and also get updates in your blog.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>