WordPress.org

Forums

WordPress and CHOWN onwership (9 posts)

  1. kicker
    Member
    Posted 2 years ago #

    I noticed I could not delete a bunch of old WPTEST sites. And I could not change the permissions of .htaccess.

    I eventually found I had to use ssh and log onto the root and use chown commands to change things from APACHE owned to ME owned. I changed the old test sites and deleted them, and I changed the .htacces.
    I notice that all the WP- directories and files that are my working website are all owned by APACHE. WP-CONTENT, index.php, etc...

    Should I change WP stuff from APACHE TO ME? I have a unmanaged dedicated server at godaddy and they refuse to answer any of these questions. Unless I cough up $40 a month for managed care. :)

    Thanx
    Kicker

  2. vtxyzzy
    Member
    Posted 2 years ago #

    This Codex article on permissions might help:

    http://codex.wordpress.org/Changing_File_Permissions

  3. kicker
    Member
    Posted 2 years ago #

    thanx!

  4. kicker
    Member
    Posted 2 years ago #

    thats not really the problem. Its OWNERSHIP to be able to change permissions and delete files and directories.

    I am confused. If it says ownership APACHE then I "server user" cannot delete files or it seems change the permissions. But if I chown it from root user, then the server cannot do whatever it does. And all WP files and directories are APACHE owned. Dazed and confused
    Kicker

  5. vtxyzzy
    Member
    Posted 2 years ago #

    Sorry, I can't help with that. Maybe some APACHE guru will chime in.

  6. ClaytonJames
    Member
    Posted 2 years ago #

    The files in your WordPress directory should not be owned by root. They should be owned by your user account. I'm not going to advise you on ownership and permission schemes for your own environment, but I think I might be able to tell you how to change them.

    chown -R [owner]:[group] /path/to/directory

    The '-R' makes the changes recursively.

    Example: If your WordPress files were located at /var/www/blog and your user account name is kicker, and you want group ownership to be apache, I think it might look something like this.

    chown -R kicker:apache /var/www/blog

    That is just an example for changing owner:group - Not a recommendation, or advice.

  7. kicker
    Member
    Posted 2 years ago #

    Thank you!
    I am no developer, I run a blog by myself, no other admin. What does GROUP mean? Should I use kicker:kicker ?
    Or does apache want to be, or need to be involved as a group?

  8. ClaytonJames
    Member
    Posted 2 years ago #

    Or does apache want to be, or need to be involved as a group?

    That depends on how apache (and php) is being run. This is a server administration issue, rather than a wordpress issue. The short version is (most likely for your circumstances) any directory that needs to be written to by the web server, will need to to be given group ownership and permissions that allow the web server to write to it.

    Files in Linux also have three file permission classes:

    • User -- The user that created the file or directory.
    • Group -- Group is a collection of users which allows for groups of users to have permissions on directories and files.
    • World -- This is for anyone on the server. It can also be called Public rather than World by some applications.

    (source)

    Consider that all of your files and directories are owned kicker:kicker
    If the web server needs to write files to /wp-content/uploads, it can't because it doesn't have permission. Having the /wp-content or maybe just the /uploads directory owned by kicker and group owned by apache - kicker:apache - might give the web server access and allow it to write to that directory. But again, ownership and permissions are directly related to how apache/php is being run, and that's a server configuration issue, so I'm very hesitant to suggest a scheme to you.

    Some quick resources:Understanding UNIX permissions and chmod

    Ubuntu Documentation: Understanding and Using File Permissions

    And that brings us back to the link vtxyzzy pointed you to: Changing File Permissions

  9. kicker
    Member
    Posted 2 years ago #

    Thanx, I did make it kicker:apache.

    Where can I find a WP guru who knows DBs to take a look

    Thanx, kicker

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.