Appropriate Permissions and Ownership for Wordpress Files
Hi,
This is my permissions and ownerships for the wordpress files. For security, should i add another rules or are these rules strong enough to protect website?
Thank you.
drwxr-xr-x 5 www-data www-data 4096 May 2 13:41 .
drwxr-xr-x 6 www-data www-data 4096 Apr 22 11:41 ..
-rw-r--r-- 1 www-data www-data 523 Apr 22 13:25 .htaccess
-rw-r--r-- 1 www-data www-data 405 Feb 6 2020 index.php
-rw-r--r-- 1 www-data www-data 19915 Jan 1 03:15 license.txt
-rw-r--r-- 1 www-data www-data 7437 Dec 28 20:38 readme.html
-rw-r--r-- 1 www-data www-data 7165 Jan 21 2021 wp-activate.php
drwxr-xr-x 9 www-data www-data 4096 Apr 5 22:13 wp-admin
-rw-r--r-- 1 www-data www-data 351 Feb 6 2020 wp-blog-header.php
-rw-r--r-- 1 www-data www-data 2338 Nov 10 02:07 wp-comments-post.php
-r--r--r-- 1 www-data www-data 3352 May 2 13:41 wp-config.php
-rw-r--r-- 1 www-data www-data 3001 Dec 14 11:44 wp-config-sample.php
drwxr-xr-x 5 www-data www-data 4096 May 2 08:28 wp-content
-rw-r--r-- 1 www-data www-data 3939 Aug 3 2021 wp-cron.php
drwxr-xr-x 26 www-data www-data 12288 Apr 5 22:13 wp-includes
-rw-r--r-- 1 www-data www-data 2496 Feb 6 2020 wp-links-opml.php
-rw-r--r-- 1 www-data www-data 3900 May 15 2021 wp-load.php
-rw-r--r-- 1 www-data www-data 47916 Jan 4 11:30 wp-login.php
-rw-r--r-- 1 www-data www-data 8582 Sep 23 2021 wp-mail.php
-rw-r--r-- 1 www-data www-data 23025 Nov 30 20:32 wp-settings.php
-rw-r--r-- 1 www-data www-data 31959 Oct 25 2021 wp-signup.php
-rw-r--r-- 1 www-data www-data 4747 Oct 9 2020 wp-trackback.php
-rw-r--r-- 1 www-data www-data 3236 Jun 8 2020 xmlrpc.php
1 Reply
✓ Best Answer
-r--r--r-- 1 www-data www-data 3352 May 2 13:41 wp-config.php
If the config file is read-only across the board how will you change it… except as root?
This should tell you all you need to know:
https://secure.wphackedhelp.com/blog/wordpress-file-and-folder-permissions/