admin管理员组

文章数量:1194351

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 2 years ago.

Improve this question

Wordpress permission issues. I'm getting Forbidden You don't have permission to access this resource even after setting the below permissions. This happens while trying to access pages like wp-admin/plugins.php. The site itself is ok

sudo chown -R www-data:www-data /var/www/site
sudo find /var/www/site/ -type f -exec chmod 640 {} \;
sudo find /var/www/site/ -type d -exec chmod 750 {} \;

After this it was still not working. I decided to give the directory full permissions chmod -R 777 but still it didn't work

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 2 years ago.

Improve this question

Wordpress permission issues. I'm getting Forbidden You don't have permission to access this resource even after setting the below permissions. This happens while trying to access pages like wp-admin/plugins.php. The site itself is ok

sudo chown -R www-data:www-data /var/www/site
sudo find /var/www/site/ -type f -exec chmod 640 {} \;
sudo find /var/www/site/ -type d -exec chmod 750 {} \;

After this it was still not working. I decided to give the directory full permissions chmod -R 777 but still it didn't work

Share Improve this question edited Aug 2, 2022 at 19:51 fuxia 107k38 gold badges255 silver badges459 bronze badges asked Aug 2, 2022 at 7:44 asegaasega 112 bronze badges 2
  • Check your Apache access and error logs. It's not necessarily file permissions that are tripping you up; it could be an extra .htaccess file, server config problems, ... – Pat J Commented Aug 2, 2022 at 20:39
  • 1 @PatJ thanks, actually restoring to default wordpress .htaccess file worked – asega Commented Aug 3, 2022 at 8:13
Add a comment  | 

1 Answer 1

Reset to default 1

I found out that the issue was on .htaccess file. I restored the file to the original wordpress config and it work fine again

# BEGIN WordPress

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Here is the wordpress htaccess config wordpress htaccess

本文标签: Forbidden You don39t have permission to access this resource Apache2441 (Ubuntu) Server