Wordpress Bitnami permissions issue

I have wp Security plugin. It got an update to change the permission which I did but after that, I am unable to make changes to wordpress especially theme settings and other content within theme blocks.

This is the permission I have right now. Any help/advice appreciated.

root directory	/opt/bitnami/apps/wordpress/htdocs/	0755	
wp-includes/	/opt/bitnami/apps/wordpress/htdocs/wp-includes	0755	
.htaccess	/opt/bitnami/apps/wordpress/htdocs/.htaccess	0644	
wp-admin/index.php	/opt/bitnami/apps/wordpress/htdocs/wp-admin/index.php	0644	
wp-admin/js/	/opt/bitnami/apps/wordpress/htdocs/wp-admin/js/	0755	
wp-content/themes/	/opt/bitnami/apps/wordpress/htdocs/wp-content/themes	0755	
wp-content/plugins/	/opt/bitnami/apps/wordpress/htdocs/wp-content/plugins	0755
wp-admin/	/opt/bitnami/apps/wordpress/htdocs/wp-admin	0755	
wp-content/	/opt/bitnami/apps/wordpress/htdocs/wp-content	0755
wp-config.php	/opt/bitnami/apps/wordpress/htdocs/wp-config.php 0640

Usually it’s not the permission issue, but rather ownership.
Usually the ownership allowing the edit is bitnami:daemon.
The permissions needed for the application is often daemon:daemon.
Hope it helps!

Hello @ausaus007007

As @bulgaru mentioned it seems to be a ownership issue. You should be able to fix it running the commands below:

sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs
sudo find /opt/bitnami/apps/wordpress/htdocs -type d -exec chmod 0775 {} \;
sudo find /opt/bitnami/apps/wordpress/htdocs -type f -exec chmod 0664 {} \;  

I hope this information is useful for you. If you have any other questions, please do not hesitate to let us know.

Best Regards,

Juan Ariza


Hey @bulgaru and @jariza

I think I have a similar issue.
I wanted to move a file to a specific folder inside /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads/backup_guard and got a permission denied error originally.
I tried to follow the advice from the forum on a different post and ended up changing the permissions using this command:
sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress

I am now having issues accessing any page on my wordpress website:
SGExceptionForbidden: Permission denied. Directory is not writable: /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads/backup-guard/

Two questions:

  1. How can I revert the changes I made? I am worried I might have messed up the ownership of more things than I intended and want to avoid any issues upfront.
  2. After I have reverted my change, which directory should I change and which permission should I use for uploading a file to that folder?

Edit: I was able to change the permission of the desired folder to get access to the wordpress website by changing permissions using
chmod 777 path_to_folder/foldername
I am still not sure if I need to change back the owner in any way for the location:

Is there someone who can verify what the ownership looks like for them for that folder using ls -l opt/bitnami/apps/wordpress
And if the ownership is the same for the subfolders

1 Like

Hi @nikhiltayal86,

Using 777 when modifying the permissions is not a good practice as it allows all the users in the system to read and modify all the WordPress files.

Could you please run the following commands to know the current permissions of your installation?

ls -la /opt/bitnami/apps/wordpress/
ls -la /opt/bitnami/apps/wordpress/htdocs
ls -la /opt/bitnami/apps/wordpress/htdocs/wp-content/

Could you also please let us know the WordPress version you have and the original version of WordPress that you launched? We modified the permissions and the configuration of the stack some versions ago so we want to check if you launched any previous version or not.


1 Like

What to do for fixing this issue.

I cant edit files using wordpress plugins, No permissions.

Please help me

Hi @sonugpc,

If you have any issues when installing / managing any plugin / theme in your WordPress, you will need to reset the permissions of the wp-content folder. Please run these commands

sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/wp-content
sudo chmod -R g+w /opt/bitnami/apps/wordpress/htdocs/wp-content

Happy to help!

Was my answer helpful? Click on :heart:


Hi! jota,
I am having issue with wp theme. I made change directly on theme files using WinScp. The changes saved normally on theme files but don’t show up on Browser devtools.
I don’t have cashing plugin. And loaded browser with CTRL f5.
Why wp shows unchanged theme or not updating?

Hi @tumurcukhb,

this is an old thread and the issue doesn’t seem to be related with the permissions. Please create a new topic in the forum so our team evaluates your configuration and logs.