• 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

Viewing 8 replies - 1 through 8 (of 8 total)
  • This Codex article on permissions might help:

    https://codex.www.ads-software.com/Changing_File_Permissions

    Thread Starter kicker

    (@kicker)

    thanx!

    Thread Starter kicker

    (@kicker)

    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

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

    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.

    Thread Starter kicker

    (@kicker)

    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?

    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

    Thread Starter kicker

    (@kicker)

    Thanx, I did make it kicker:apache.

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

    Thanx, kicker

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress and CHOWN onwership’ is closed to new replies.