WordPress.org

Ready to get started?Download WordPress

Forums

file permissions/ownership and FTP (4 posts)

  1. albertknox
    Member
    Posted 8 years ago #

    I am using WordPress 2.0.2.

    Recently I tried to access by FTP the folder /wp-content/uploads but I received an "permission denied" error. I checked the permissions on this folder and they were "727 drwx-w-rwx". I think that means I should have no problem, right? Anyway, I then logged in through my web host's control panel and found the folder's owner wasn't "myusername" but "httpd".

    I asked my webhost tech support for help and they changed the owner to "myusername" so I could access the folder. He said that when the WordPress script ran and created the folder the owner became "httpd".

    I noticed another folder /wp-content/cache has this same problem. Is there any other solution to this besides asking my webhost to reset the owner to "myusername"?

    Thanks!

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Files that wordpress creates are created as the user running the webpage, which is "httpd". There's no workaround for this, really, that's the way unix-like systems work.

    However, WordPress only creates those directories when they're not already there. So now that the directory is there, the username won't change on it unless you delete it.

    Also, the permissions for folders along those lines probably should be 766. Gives you full access, and everybody else (including the httpd user) read and write access only. If you're in the same group as the httpd user, then 760 should be sufficent permissions.

    As far as the cache goes, you'll never need access to it anyway. Although you may want to delete the contents of the thing entirely at some point, so changing it to your username might be beneficial.

  3. albertknox
    Member
    Posted 8 years ago #

    Thanks for the help Otto42. I looked around the other directories and only the uploads folder and cache folder had the owner set as "httpd". I guess I will ask my webhost tech support to reset everything to "myusername" ownership.

    My understanding of what files and directories should have what permissions is still kind of vague. I know things have to be permissive enough to allow others to view your web page, but not enough to meddle with anything.

  4. albertknox
    Member
    Posted 8 years ago #

    Just another quick question out of curiosity, why did the WordPress script set the permissions of the cache folder at 727? It seems weird to give full permissions to the public but restrict access to the group.

    I think since "myusername" is under the group permission that is why I could not access it.

Topic Closed

This topic has been closed to new replies.

About this Topic