I've been working on securing my WordPress site. It was all working before I changed the permissions. I now get a 403 Forbidden error when trying to log in.
I added my username to the www-data
group:
sudo usermod -aG www-data admin
Used the following commands to set the permissions:
sudo find . -type d -exec chmod -R 775 {} \
sudo find . -type f -exec chmod 664 {} \
sudo chown admin:www-data -R wp-content/*
sudo chmod 660 wp-config.php .htaccess
Can anyone help as I'm struggling to figure out why as it's actually what WordPress said to do.
Here are the permissions - I think the sr
is causing the issue on the directories:
drwxrwsr-x 9 admin admin 4096 Jun 19 09:57 wp-admin
-rwxrwxr-x 1 admin admin 364 Jun 19 09:56 wp-blog-header.php
-rwxrwxr-x 1 admin admin 1477 Sep 15 17:55 wp-comments-post.php
-rwxrwxr-x 1 admin admin 4840 Sep 15 18:57 wp-config.php
drwxrwsr-x 8 admin admin 4096 Jun 19 10:25 wp-content
admin
group, while you want thewww-data
group and their permissions on those files…