What file permissions/ownership scheme do you use?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1492
    Fledo
    Participant

    I’m trying to [harden](https://wordpress.org/support/article/hardening-wordpress/#file-permissions) WP and I’m struggling with user [permissions/ownership](https://wordpress.org/support/article/changing-file-permissions/). Files (except uploads) should only be writable by my user acc, e.g. `wordpress:www-data` 644. However, this breaks updates and plugin installations via WebUI. Is that the point in this case? Handling updates via e.g. wp-cli instead. What scheme do you use?

    This is my current root:

    “`
    [email protected]:/var/www/html# ls -l
    total 230
    -rw-r–r– 1 wordpress www-data 405 Apr 2 2020 index.php
    -rw-r–r– 1 wordpress www-data 85 Sep 6 15:09 robots.txt
    -rw-r–r– 1 wordpress www-data 7101 Sep 1 15:52 wp-activate.php
    drwxr-xr-x 9 wordpress www-data 97 Mar 24 2020 wp-admin
    -rw-r–r– 1 wordpress www-data 351 Apr 2 2020 wp-blog-header.php
    -rw-r–r– 1 wordpress www-data 2332 Sep 1 15:52 wp-comments-post.php
    -r–r—– 1 wordpress www-data 3827 Oct 6 17:09 wp-config.php
    drwxrwxr-x 10 wordpress www-data 14 Oct 23 10:42 wp-content
    -rw-r–r– 1 wordpress www-data 3940 Apr 2 2020 wp-cron.php
    drwxr-xr-x 24 wordpress www-data 221 Sep 1 15:52 wp-includes
    -rw-r–r– 1 wordpress www-data 2496 Apr 2 2020 wp-links-opml.php
    -rw-r–r– 1 wordpress www-data 3300 Apr 2 2020 wp-load.php
    -rw-r–r– 1 wordpress www-data 48761 Sep 1 15:52 wp-login.php
    -rw-r–r– 1 wordpress www-data 8509 May 5 11:51 wp-mail.php
    -rw-r–r– 1 wordpress www-data 20181 Sep 1 15:52 wp-settings.php
    -rw-r–r– 1 wordpress www-data 31159 Sep 1 15:52 wp-signup.php
    -rw-r–r– 1 wordpress www-data 4755 Apr 2 2020 wp-trackback.php
    -rw-r–r– 1 wordpress www-data 3236 Sep 1 15:52 xmlrpc.php
    “`

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.