Permissions denied after upgrading server to the latest version of Bitnami certified WordPress on AWS

Keywords: WordPress - AWS - Technical issue - Permissions
bnsupport ID: The command to generate the code does
Description:
I have already seen more than 3 guides on how to change the permissions of WordPress folders and so on and I still have the same error, I try to use my WordPress normally as I had it before updating, and now I can not.

When I try to enter the editing functions that my theme has, I get “You do not have permissions to access this section”. As far as I remember there was a guide to solve this by changing the permissions to the folders by FileZilla or by console, but even that doesn’t work for me.

Because it turns out that in this new update all lunar change no longer exists the htdocs folder is now otp/bitnami/WordPress/.

In short, I have problem with permissions to use WordPress I get that I have no permissions when I want to use my theme or my plug-in comes out the same error any solution?

Translated with www.DeepL.com/Translator (free version)

Hi @carbo17

Thanks for using Bitnami WordPress!

Because it turns out that in this new update all lunar change no longer exists the htdocs folder is now otp/bitnami/WordPress/.

We are progressively migrating all of our applications to a new structure, and recently we upgraded the WordPress stack. As a result, the old /opt/bitnami/apps/wordpress/htdocs directory can now be found at /opt/bitnami/wordpress. You can find more information about the changes we are performing here:

https://docs.bitnami.com/general/faq/get-started/understand-upcoming-changes/

Having said that, to restore the default permissions in your stack you can follow this guide:
https://docs.bitnami.com/aws/apps/wordpress/administration/understand-file-permissions/

For an instance using the new path, the commands would look like this:

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

Additionally, we have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

I mean I understand that they are updating, and it’s not bad it makes it easier for me, but what makes it a little tedious is that there are no updated guides and I have an error that I can’t correct.

For example, I want to access this section of my theme on my new AWS instance. On my old page which is not upgraded it works fine, but on the new instance which is upgraded it does not work.

Just now I was putting the commands you gave me, but they don’t work either, they don’t solve the problem.

Even the bitnami tool to pass the code ID does not work for me, look at this.
image

To this I mean that it is a headache, I do not refuse to update as I said it seems good because it is seen that the commands are shorter, but how can we solve these problems if we do not have updated guides, even the commands that I passed as I said do not work to solve the main problem. So I would appreciate if you could help me with this.

image

Attached is the result of the analysis

I was able to get the ID code 3902becb-c99a-aee7-9c19-09f392e67055

ssl certificate setup *wordpress* google cloud platform bitnami After entering these commands, your certificates will be generated.

What does that answer have to do with my topic?

Hi @carbo17

I mean I understand that they are updating, and it’s not bad it makes it easier for me, but what makes it a little tedious is that there are no updated guides and I have an error that I can’t correct.

To this I mean that it is a headache, I do not refuse to update as I said it seems good because it is seen that the commands are shorter, but how can we solve these problems if we do not have updated guides, even the commands that I passed as I said do not work to solve the main problem. So I would appreciate if you could help me with this.

I am sorry to hear you are experiencing problems :sad: Nevertheless, I should mention that when the stack was migrated so were the guides. If you find any problem with the guides let us know and we will report it to the Documentation team in order to review and update them if necessary.

Just now I was putting the commands you gave me, but they don’t work either, they don’t solve the problem.

It seems you are using a wrong path when executing some of the commands. The correct path for it to work should be /opt/bitnami/wordpress, as stated in my previous response.

Having said that, I have checked the permissions in the report generated by the bnsupport-tool and they seem to be correct at first sight. Nonetheless, one of your installed plugins (simple-tags) seems to be producing a PHP error. Taking a look at your Apache’s error_log file, we can see the following:

[Mon May 24 07:25:21.828947 2021] [proxy_fcgi:error] [pid 1805:tid 140681066452736] [client 190.110.220.130:50474] AH01071: Got error 'PHP message: PHP Warning:  Use of undefined constant STAGS_OPTIONS_NAME - assumed 'STAGS_OPTIONS_NAME' (this will throw an Error in a future version of PHP) in /bitnami/wordpress/wp-content/plugins/simple-tags/uninstall.php on line 9PHP message: PHP Warning:  Use of undefined constant STAGS_OPTIONS_NAME - assumed 'STAGS_OPTIONS_NAME' (this will throw an Error in a future version of PHP) in /bitnami/wordpress/wp-content/plugins/simple-tags/uninstall.php on line 10PHP message: PHP Warning:  Use of undefined constant STAGS_OPTIONS_NAME_AUTO - assumed 'STAGS_OPTIONS_NAME_AUTO' (this will throw an Error in a future version of PHP) in /bitnami/wordpress/wp-content/plugins/simple-tags/uninstall.php on line 12', referer: https://34.221.214.19/wp-admin/plugins.php?plugin_status=all&paged=1&s

Maybe this plugin (that produces the PHP error) is the one root of your problem. I recommend you disable it temporarily and check if that solves your issue.

Even the bitnami tool to pass the code ID does not work for me, look at this.

We are working on improving the output of the new version of the bnsupport-tool. Those errors you see on the screen are NOT errors of the bnsupport-tool itself, but possible errors it has detected in your system.

Thanks for your overall feedback, we value opinions users give us and evaluate them in order to improve!

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

I am checking the plug-in you indicate, but I can’t find it, there is no such plug-in.

Dear I would appreciate if you could help me with some command to correct the error I have of the permissions in my theme. The commands that I passed solved other problems I had with plug-in, but with the theme does not work.

Hi @carbo17

I am checking the plug-in you indicate, but I can’t find it, there is no such plug-in.

Okay, so maybe it was an old entry back from when the plugin was installed.

Dear I would appreciate if you could help me with some command to correct the error I have of the permissions in my theme. The commands that I passed solved other problems I had with plug-in, but with the theme does not work.

Let’s try to bound the issue and discover what is happening:

  1. Deactivate all your plugins to see if one of them is causing this permissions issue. First, list all the active plugins and note them down.
$ sudo wp plugin list
+--------------------------------+----------+-----------+---------+
| name                           | status   | update    | version |
+--------------------------------+----------+-----------+---------+
| akismet                        | active | none      | 4.1.9   |
| all-in-one-wp-migration        | inactive | none      | 7.43    |
| all-in-one-seo-pack            | inactive | none      | 4.1.1.1 |
+--------------------------------+----------+-----------+---------+

Then, deactivate all plugins using the following command:

$ sudo wp plugin deactivate --all

Ref: https://developer.wordpress.org/cli/commands/plugin/deactivate/

  1. Restart the apache service and try to access the page you had a problem with again.
$ sudo /opt/bitnami/ctlscript.sh restart apache
  1. If you keep experiencing problems, please run the following command:
$ sudo tail -n 40 /opt/bitnami/apache2/logs/error_log
  1. You can activate plugins back using the UI or running the following command:
$ sudo wp plugin activate PLUGIN_NAME

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

I followed the steps you indicated, but it did not solve the problem and this came up in the error log.

Hi @carbo17

From the error log, it seems to me like the plugins were not correctly deactivated. Can you please verify that?

After running the previous steps and deactivating your plugins, verify that the status column of the following command says inactive for every item:

$ sudo wp plugin list

Could you please share the output of all the aforementioned commands and this new one? Notice that you don’t have to perform step 4 (re-activating plugins) if the page is still not working.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

When I put the command in the CMD it came up in green color disabled.

But when I entered WordPress I saw them and they were still active. I deactivated them manually.

Also when I wanted to activate them again with the code you gave me it did not work I had to activate it manually.

Just in case it is an error of the AWS instance I deleted it and created it again and the same thing happened.

Hi @carbo17

I have tried to replicate your issue but I cannot reproduce it. The activation/deactivation of plugins works as expected on my side, here are the steps I followed and their results:

  1. On a brand new instance, list the plugins:
$ sudo wp plugin list
+--------------------------------+----------+-----------+---------+
| name                           | status   | update    | version |
+--------------------------------+----------+-----------+---------+
| akismet                        | inactive | none      | 4.1.9   |
| all-in-one-wp-migration        | inactive | none      | 7.43    |
| all-in-one-seo-pack            | inactive | none      | 4.1.1.1 |
| amp                            | active   | none      | 2.1.2   |
| amazon-polly                   | inactive | none      | 4.3.1   |
| google-analytics-for-wordpress | inactive | none      | 7.17.0  |
| hello                          | inactive | none      | 1.7.2   |
| jetpack                        | active   | none      | 9.7     |
| simple-tags                    | inactive | available | 2.5.7   |
| w3-total-cache                 | inactive | none      | 2.1.2   |
| wp-mail-smtp                   | inactive | none      | 2.8.0   |
+--------------------------------+----------+-----------+---------+

  1. Use the command I shared before to deactivate all plugins:
$ sudo wp plugin deactivate --all
Plugin 'amp' deactivated.
Plugin 'jetpack' deactivated.
Success: Deactivated 2 of 11 plugins.

$ sudo wp plugin list
+--------------------------------+----------+-----------+---------+
| name                           | status   | update    | version |
+--------------------------------+----------+-----------+---------+
| akismet                        | inactive | none      | 4.1.9   |
| all-in-one-wp-migration        | inactive | none      | 7.43    |
| all-in-one-seo-pack            | inactive | none      | 4.1.1.1 |
| amp                            | inactive | none      | 2.1.2   |
| amazon-polly                   | inactive | none      | 4.3.1   |
| google-analytics-for-wordpress | inactive | none      | 7.17.0  |
| hello                          | inactive | none      | 1.7.2   |
| jetpack                        | inactive | none      | 9.7     |
| simple-tags                    | inactive | available | 2.5.7   |
| w3-total-cache                 | inactive | none      | 2.1.2   |
| wp-mail-smtp                   | inactive | none      | 2.8.0   |
+--------------------------------+----------+-----------+---------+
  1. I want to activate back amp and jetpack:
$ sudo wp plugin activate amp jetpack
Plugin 'amp' activated.
Plugin 'jetpack' activated.
Success: Activated 2 of 2 plugins.

$ sudo wp plugin list
+--------------------------------+----------+-----------+---------+
| name                           | status   | update    | version |
+--------------------------------+----------+-----------+---------+
| akismet                        | inactive | none      | 4.1.9   |
| all-in-one-wp-migration        | inactive | none      | 7.43    |
| all-in-one-seo-pack            | inactive | none      | 4.1.1.1 |
| amp                            | active   | none      | 2.1.2   |
| amazon-polly                   | inactive | none      | 4.3.1   |
| google-analytics-for-wordpress | inactive | none      | 7.17.0  |
| hello                          | inactive | none      | 1.7.2   |
| jetpack                        | active   | none      | 9.7     |
| simple-tags                    | inactive | available | 2.5.7   |
| w3-total-cache                 | inactive | none      | 2.1.2   |
| wp-mail-smtp                   | inactive | none      | 2.8.0   |
+--------------------------------+----------+-----------+---------+

The changes are also reflected in the UI.

Can you please guide me through the steps you perform so that I can reproduce it on my side and recommend based on that?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

I would appreciate if we could focus on the other permissions issue that won’t let me edit my theme settings, as I pointed out to you the previous commands fixed the permissions issue for the plugins, but not for the theme.

What could it be or how did you fix it?

What could it be or how did you fix it?

If you have already deactivated all your plugins, please try to access the theme site again. If you still face issues, let’s try to find out if something is being logged in the error_log file. Previously, this log pointed to some problems in the plugins. Now that the plugins are deactivated, we shouldn’t be able to see any line making reference to it.

  1. Restart the apache service and try to access the page you had a problem with again.
$ sudo /opt/bitnami/ctlscript.sh restart apache
  1. Run the following command to print the latest errors registered in your error_log file and your PHP-FMP as well:
$ sudo tail -n 40 /opt/bitnami/apache2/logs/error_log
$ sudo tail -n 40 /opt/bitnami/php/logs/php-fpm.log
  1. Run the following command to print out the status of the plugins:
$ sudo wp plugin list

With that, let us try to bound the issue

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

I have done the steps you indicated, this is what I got in the terminal



Also comment that the server I use is from AWS the WordPress option certifies bitnami,

And I also comment that the commands that happens to me, I remove the $ sign, because with that sign do not work only work when they start with sudo /otp/…

I hope the images that I pass and what I have just indicated will help, I need to have this problem solved as soon as possible.

Hi! Thanks for sharing the screenshots!

And I also comment that the commands that happens to me, I remove the $ sign, because with that sign do not work only work when they start with sudo /otp/…

Yes, the dollar sign ($) is just a way to indicate that whatever follows is a command and not regular text or an output.

I hope the images that I pass and what I have just indicated will help

Regarding the screenshots, I see there are a couple of entries matching the date you posted the reply (June 2). Hence, I will proceed with them as the result of following my steps (trying to access the faulty page).

Focusing on June 2, there are some logs regarding PhpMyAdmin (have you tried accessing this application as well?) which I will also ignore. We are left with this error:

Screenshot 2021-06-03 at 13.06.29

It seems that there are some missing files that one of those PHP files is trying to import. This is weird, as I have launched a new stack and could not find that those PHP files had any reference to the directory. Could you please try to execute the following commands?

$ sudo ls -la /bitnami/wordpress
$ sudo cat /bitnami/wordpress/wp-config.php | grep lib
$ sudo cat /opt/bitnami/wordpress/wp-config.php | grep lib
$ sudo cat /opt/bitnami/wordpress/wp-config.php | grep set
$ sudo cat /opt/bitnami/wordpress/wp-settings.php | grep lib
$ sudo cat /opt/bitnami/php/lib/php/

I’m curious about how you carried out the upgrading process. What are the steps you followed to migrate your data?

Additionally, it would be nice if you could re-run the bnsupport-tool again to obtain further info :slightly_smiling_face:

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

I attach a video showing the moment I place the commands and also in the video you can see the old version of my bitnami which works fine my theme, and you can also see the updated version which disabled the settings of my theme and other things more.

https://mega.nz/file/lpAXQIhC#98zcUKWgTpSW64dNjHLDm4uVwT472pRPliyPWBgIRcs