Permission denied when I try to install or update Wordpress plugins

Keywords: WordPress - AWS - Technical issue - Plugins installation/configuration

bnsupport ID: 63117c71-5838-afa5-f78c-be9487442443

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
? Resources: Found possible issues
? Processes: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/administration/use-pagespeed/#disable-pagespeed
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
Hi. I have a wordpress instance installed on Lightsail (AWS). Since I installed and uninstalled the WP Rocket plugin, I can’t install or update plugins. Everything was fine before this action. I tried to find what the problem is and I changed the folders and files permission according to what the tutorials told me to do. Even with the new permissions, I can’t install or update plugins. It seems like I have to modif the wp-config.php to remove some lines WP Rocket wrote in it, but when I try to update the file, the server desotn autorize me to do so.

As I am new to all of this and tried everything I could by myself, I now need your help. Thank you :slight_smile:

Here is the message I get when I try to install or update a Plugin:

Installation failed: Download failed. Destination directory for file streaming does not exist or is not writable.

Update failed: Download failed. Destination directory for file streaming does not exist or is not writable.

Hi @dromadairemauve,

Could you try the following commands:

cd /opt/bitnami
sudo chown -R bitnami:daemon wordpress
sudo find wordpress -type d -exec chmod 775 {} \;
sudo find wordpress -type f -exec chmod 664 {} \;
sudo chmod 640 wordpress/wp-config.php
cd /bitnami
sudo chown -R bitnami:daemon wordpress
sudo find wordpress -type d -exec chmod 775 {} \;
sudo find wordpress -type f -exec chmod 664 {} \;
sudo chmod 640 wordpress/wp-config.php

If that does not work, take a look at this previous similar case:

I hope it helps

1 Like

Your commands worked, @davidg ! Plugins can now be installed and updated. Thank you :slight_smile:

I had to rename some path. Here is what I used :

cd /opt/bitnami/apps
sudo chown -R bitnami:daemon wordpress
sudo find wordpress -type d -exec chmod 775 {} ;
sudo find wordpress -type f -exec chmod 664 {} ;
sudo chmod 640 wordpress/htdocs/wp-config.php