I messed up m Word Press permission, reset them but now I can't access my bitnami application password

Keywords: WordPress - AWS - Technical issue - Credentials
bnsupport ID: cad6cf64-da64-98df-82a8-0c62edb3537b
I was trying to edit php files using Filezilla. I could see the files but I couldn’t edit them so I decided to edit permissions to make them writeable. Unfortunately, I lost all access to htdocs files for my website. The website displayed 403 error and permission was denied.
I reset the code using some of the bitnami documentation. I could now access the wordpress dashboard of my website.

I still wanted to access my theme and php files. However when I tried to SSH in AWS light sail and get the password, permission was denied? What could be the issue and are there some files I inherently lost while restoring permissions.
How do I get my WordPress admin password again?

When I try to type in a command in the SSH client, it displays;

Could not chdir to home directory /home/bitnami: Permission denied
-bash: /home/bitnami/.bash_profile: Permission denied
bitnami@ip-172-26-10-138:/$ ^C

How do I fix this, I am stuck?

Hi @nakykaren,

Ok, it seems you broke the permissions configuration of the /home/bitnami folder. Can you run these commands?

sudo ls -la /home/bitnami
sudo ls -la /home/bitnami/.ssh


when I run

sudo ls -la /home/bitnami

It displays

total 36
drw-rw-r-- 3 bitnami daemon 4096 Apr 12 20:42 .
drwxr-xr-x 3 root root 4096 Feb 15 13:11 …
lrwxrwxrwx 1 bitnami daemon 17 Feb 15 13:23 apps -> /opt/bitnami/apps
-rw------- 1 bitnami daemon 1053 Apr 13 18:10 .bash_history
-rw-r–r-- 1 bitnami daemon 220 Apr 18 2019 .bash_logout
-rw-r–r-- 1 bitnami daemon 3752 Feb 15 13:23 .bashrc
-rw------- 1 bitnami daemon 13 Apr 11 17:51 bitnami_application_password
-r-------- 1 bitnami daemon 424 Apr 11 17:51 bitnami_credentials
lrwxrwxrwx 1 bitnami daemon 27 Feb 15 13:23 htdocs -> /opt/bitnami/apache2/htdocs
-rw-r–r-- 1 bitnami daemon 807 Apr 18 2019 .profile
drw-rw-r-- 2 bitnami daemon 4096 Apr 11 17:49 .ssh
lrwxrwxrwx 1 bitnami daemon 12 Feb 15 13:23 stack ->

Then for the 2nd command;

ls: cannot access ‘/home/bitnami.ssh’: No such file or directory
bitnami@ip-172-xx-xx-xxx:/$ sudo ls -la /home/bitnami/.ssh
total 12
drw-rw-r-- 2 bitnami daemon 4096 Apr 11 17:49 .
drw-rw-r-- 3 bitnami daemon 4096 Apr 12 20:42 …
-rw------- 1 bitnami daemon 405 Apr 11 17:49 authorized_keys

It still show this when I try to ssh;

Last login: Wed Apr 21 10:59:55 2021 from xx.xxx.xxx.x1
-bash: /home/bitnami/.bash_profile: Permission deniedission denied

Hi @nakykaren,

Can you copy paste and run this command:

sudo ls -la /home/bitnami/.ssh

And also reset the permissions and owner for the ssh folder:

chmod 700 ~/.ssh
sudo chown bitnami:bitnami ~/.ssh

And set the files in the bitnami home folder to the owner bitnami:

sudo find /home/bitnami/ -type f -exec chown bitnami {} \;


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.