WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Permission change results in errors

[Resolved] Permission change results in errors

  • I was getting the “if this file were writable you could edit it”. So I used my ftp client (FireFTP) to change the permissions for the “themes” directory and its contents to 766. When I do that, I get the following errors, when I go to the presentations tab of the admin section (these are just the first few lines), and I lose my blog.

    Warning: is_dir() [function.is-dir]: Stat failed for public_html/mndoci/blog/wp-content/themes/.. (errno=13 – Permission denied) in public_html/mndoci/blog/wp-includes/functions.php on line 1809

    Warning: is_dir() [function.is-dir]: Stat failed for public_html/mndoci/blog/wp-content/themes/greenmarinee (errno=13 – Permission denied) in public_html/mndoci/blog/wp-includes/functions.php on line 1809

    Warning: is_dir() [function.is-dir]: Stat failed for public_html/mndoci/blog/wp-content/themes/almost-spring (errno=13 – Permission denied) in public_html/mndoci/blog/wp-includes/functions.php on line 1809

    Warning: is_dir() [function.is-dir]: Stat failed for public_html/mndoci/blog/wp-content/themes/ocadia (errno=13 – Permission denied) in public_html/mndoci/blog/wp-includes/functions.php on line 1809

    When I change permissions to 775 the blog comes back, but the themes are still not editable.

    I recently moved my blog to a new host, and have had some troubles since, although I can post new posts, etc.

Viewing 5 replies - 1 through 5 (of 5 total)
  • whooami

    @whooami

    Member

    777 or 775, not 766

    file permissions tutorial (LINUX treats everything like a file, a directory, for instance, is a file)

    http://www.december.com/unix/tutor/permissions.html

    ——–

    and youre not realizing that just because youve made a file (the directory) writable, you havent done anything to the other files (the theme files). You need to chmod them as well. (666 is world-writable, and ought to suffice in the short-term)

    vkaryl’s advice below is the best advice though. for a whole ton of reasons. You already have the ftp client connected, whats the big deal to download, edit, upload.

    Best way to edit files is to download them from the server and edit locally using either a decent css/html editor (coffeecup, topstyle) or notepad2/notepad++, then upload to your wp install.

    If you insist on editing within wp, you should check with your host support staff regarding the correct permissions; mostly it seems either 666 or 777 are the permissions that allow editing within wp.

    Let me clarify – I was not changing any of the files in my wordpress themes (I always edit local copies). I noticed the “if this file were writable” message, which did not show up on my previous host, so decided to change the permissions.

    The permissions were changed recursively (chmod -R), so they should have propagated to all the files.

    What I would like to understand is the source of the errors that I noticed.

    whooami

    @whooami

    Member

    When I change permissions to 775 the blog comes back, but the themes are still not editable. …

    I was not changing any of the files in my wordpress themes (I always edit local copies).

    I dont understand what the problem is, you saw an error and what? Are trying to set permissions so that you dont see it? Simplest answer: If you dont attempt to edit the themes via the backend, you wont see a permissions error.

    The proper and safest permissions for your wp-themes directory and all the files/sub-dirs within it are going to be permissions that result in that error if you attempting editing. Theres no other way to explain that.

    That you didnt see it on your other host just means that the permissions were looser, I imagine.

    And the source of the error, the answer to your last question, is explained in the link I posted in my first reply.

    You cannot edit a file in the backend unless the file has been chmod’d to the proper permissions.

    I saw the errors posted in my originals after I changed permissions and went into my WP dashboard to see if the files were still editable. I didn’t see the files anymore, just the error. Anyway, thanks to some of the suggestions above, everything is in order and I can edit files at the backend if I wanted to.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Permission change results in errors’ is closed to new replies.