Support » Fixing WordPress » Public_html permissions question

  • Probably a dumb question. I installed the latest version (0.5.3). On the configuration page, I get a warning message that my public_html file is writeable and that I should change it to read only.

    The permissions for my public_html file (which contains my WP installation) is set to 755. If I change it to 754 or 744, I get a 404 Access Forbidden error when I try to log in to or access the site. Don’t I need the owner permissions to be Read, Write, Execute? Why is Super Cache concerned about the public_html file being writeable if it is only writeable by the owner? Should I be concerned about the current settings and, if so, what should they be?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    It does that on mine too. I know better, so I ignore it.

    The short version is that it uses the PHP function is_writable() to determine that, and that function is not particularly accurate.

    Note that depending on your configuration, the webserver, when running PHP, may be running as you, with your access permissions. So a 755 could be writable to the webserver running as you. Set the permissions to 555 and see if that makes the message go away.

    Otto42 – maybe it needs a “I know already, go away” button to hide this message?

    I still shudder to think that someone’s web directory would be writeable by the web server!

    Interestingly, I cannot change the permissions to 555 using my FTP client. It reverts to/stays at 755. (I have not tried with the web host’s File Manager function).

    Perhaps I misunderstand all this, but if the server will not allow me to change permissions to that directory via FTP, would that indicate the directory is writeable by the server?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    donncha: Consider the use of suexec on many webservers. This allows the PHP apps to run as the user, and thus they get the users own permissions.

    prairieprog: Hard to say. Write a simple PHP program that attempts to create and write to a file in that directory, then run it through the website. That’ll tell you for sure.


    file_put_contents('./testfile.txt', 'This directory is writable');

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Public_html permissions question’ is closed to new replies.