最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

azure - Issue with setting the proper permissions for our WordPress - Stack Overflow

programmeradmin1浏览0评论

We are facing an issue with setting the proper permissions for our WordPress installation located at /var/www/wordpress on our Web App - Azure server.

We are attempting to set the following permissions using the following commands:

chown www-data:www-data -R * (to let Apache/nginix be the owner)

find . -type d -exec chmod 755 {} ; (to change directory permissions to rwxr-xr-x)

find . -type f -exec chmod 644 {} ; (to change file permissions to rw-r--r--)

However, we are unable to apply these changes successfully.

Additionally, is there any option in the Azure Portal to modify the configuration so that I can apply chmod 755 and chmod 644?

I am getting this error continuously, and I cannot proceed with the configuration of my application until these permissions are fixed, as SSH commands are not working to adjust them. I'm not sure where else in Azure I can adjust these permissions.

We are facing an issue with setting the proper permissions for our WordPress installation located at /var/www/wordpress on our Web App - Azure server.

We are attempting to set the following permissions using the following commands:

chown www-data:www-data -R * (to let Apache/nginix be the owner)

find . -type d -exec chmod 755 {} ; (to change directory permissions to rwxr-xr-x)

find . -type f -exec chmod 644 {} ; (to change file permissions to rw-r--r--)

However, we are unable to apply these changes successfully.

Additionally, is there any option in the Azure Portal to modify the configuration so that I can apply chmod 755 and chmod 644?

I am getting this error continuously, and I cannot proceed with the configuration of my application until these permissions are fixed, as SSH commands are not working to adjust them. I'm not sure where else in Azure I can adjust these permissions.

Share Improve this question edited Mar 19 at 5:11 James Z 12.3k10 gold badges27 silver badges47 bronze badges asked Mar 18 at 19:19 Altina HotiAltina Hoti 11 bronze badge 1
  • You may need sudo on those chown and find ... chmod commands. Unprivlleged users can't change file ownership to other unprivileged users. – O. Jones Commented Mar 19 at 14:05
Add a comment  | 

1 Answer 1

Reset to default 0

First, I see this question is tagged azure-web-app-service, but your question indicates you are not running the best practice method of running WordPress on App Service, which is by running the official Microsoft WordPress container image. Learn more about running WordPress on Azure using best practices here.

Second, to answer your question, I'm unable to tell if you're running an App Service with the PHP stack or as a virtual machine running in Azure. I'm thinking it must be a virtual machine.

Additionally, is there any option in the Azure Portal to modify the configuration so that I can apply chmod 755 and chmod 644?

If you truly are running an App Service, then your best option is to use Kudu. This will allow you to access SSH and have full access to the web app as you will be the root user. You will find 'Advanced Tools' on the left navigation under 'Developer Tools'. The URL will look similar to https://[your-app-service-name].scm.azurewebsites/. To access the new UI, which also provides a file editor for you, go to https://[your-app-service-name].scm.azurewebsites/newui.

By the sounds of you are already have SSH access. In which case it's hard to know what the issue could be without knowing:

  • What user are you running as

  • What is the error you are seeing when you fail to run the commands.

发布评论

评论列表(0)

  1. 暂无评论