WordPress.org

Ready to get started?Download WordPress

Forums

CHMOD Questions (16 posts)

  1. marginwalker
    Member
    Posted 8 years ago #

    Hello, which files should be Chmod to 755?

    With thanks

    Margin

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Folders to 755
    Files to 644
    Files that need to be writable (themes usually) 666

    http://www.tamba2.org.uk/wordpress/chmod/

  3. marginwalker
    Member
    Posted 8 years ago #

    That doesnt seem to work :(

    Execution of (wp-admin/index.php) is not permitted for the following reason:

    Script is not executable. Issue 'chmod 755 filename'

  4. James
    Happiness Engineer
    Posted 8 years ago #

    Then you hosting provider is probably running PHP as CGI. That isn't necessarily a bad thing, but all PHP files will need to have executable permissions. So, follow this schema:

    Folders to 755
    Files to 755
    Files that need to be writable (themes usually) 777

  5. Mark (podz)
    Support Maven
    Posted 8 years ago #

    I'm running php as cgi, and 755 / 644 / 666 works for me.

    I suggest you talk to your host as they may have different restrictions.

  6. James
    Happiness Engineer
    Posted 8 years ago #

    Weird, when I was under Dreamhost, they told me that all of my PHP scripts had to be above 755 because they were running PHP as CGI.

    Podz, if you are referring to your blog on A Small Orange, they are running PHP as an Apache module. I think that can only be changed to PHP as CGI if you are on a VPS or dedicated server.

  7. Mark (podz)
    Support Maven
    Posted 8 years ago #

    I'm running on ASO and Site5.

  8. James
    Happiness Engineer
    Posted 8 years ago #

    Oh, Site 5 runs PHP as CGI. Hm, maybe there are different PHP as CGI configurations.

  9. marginwalker
    Member
    Posted 8 years ago #

    Ive been editing my permissions on my new host:

    Now this is what I get.

    Warning: main(/home/httpd/vhosts/marginalwalker.co.uk/httpdocs/wp-includes/wp-db.php): failed to open stream: Permission denied in /home/httpd/vhosts/marginalwalker.co.uk/httpdocs/wp-settings.php on line 59

    Fatal error: main(): Failed opening required '/home/httpd/vhosts/marginalwalker.co.uk/httpdocs/wp-includes/wp-db.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/marginalwalker.co.uk/httpdocs/wp-settings.php on line 59

    Anyone able to inform me what to do?

  10. vkaryl
    Member
    Posted 8 years ago #

    An aside on the whole permissions situation: I have a dozen or more installs of wp, on various hosts. In NONE of them do I have to have permissions set other than all files at 644, all folders at 755 in order to work: this includes plugins AND THEMES (excepting ONLY the cache folder for WeatherIcon, which has to be world writeable).

    Point: several installs are on "php as cgi" servers; several are on "php as apache module" servers - they ALL WORK EXACTLY THE SAME WAY. I've not had to tweak, nor have I had to ask my hosts to change anything at all. This also (and against "current wisdom") includes setting permalinks (with .htaccess at 777 ONLY UNTIL WRITTEN TO BY WP, then reset to 644 immediately thereafter) and having "write new pages" work just fine.

    YMMV.

  11. marginwalker
    Member
    Posted 8 years ago #

    Is there any plugins that have to be different to to 644 and 755?

  12. mylagoon
    Member
    Posted 8 years ago #

    I've personally never had to change permissions on a plugin file, but that doesn't mean that it doesn't happen. I've never heard of it though.

  13. whooami
    Member
    Posted 8 years ago #

    bah podz ..
    "Files that need to be writable (themes usually) 777"

    Thats simply NOT true. Even suggesting that they MIGHT choose those permissions neccessitates an explanation as to why. A stock install of WP DOES NOT require theme files be writable -- its a CONVENIENCE for file editing via the admin interface.

    (oops valkryl beat me to it)

  14. Mark (podz)
    Support Maven
    Posted 8 years ago #

    I didn't say that .. ?
    :)

  15. ComputerGuru
    Member
    Posted 8 years ago #

    Are you by any chance on a Windows host?
    Ridiculous question in all likelihood, but if you are, give CHMOD-Win a shot. Its a CHMOD program for IIS/Apache on Windows. http://neosmart.net/Products/CHMOD-Win.htm

  16. vkaryl
    Member
    Posted 8 years ago #

    As to plugins: as I said above, the only thing I've ever had to change is the cache folder for WeatherIcon, and this is addressed in the installation - if you haven't changed it, the Options page for it will remind you to do so.

Topic Closed

This topic has been closed to new replies.

About this Topic