Azure: Drupal 8, settings.php/directory access denied

Hi all,

Last week we tried to install Drupal by using the default template for Drupal 8 + MySql database in Azure (using drupal-nginx-fpm:0.1, Linux environment). However, we bumped up to an issue where after an X time Drupal isn’t responding (502/503 error in browser) by the following error in the  logging. 

2018-03-28 05:33:25.746 ERROR - Container xxxxxx for site xxxxxx has exited, failing site start
2018-03-28 05:33:26.785 INFO  - Issuing docker pull: imagename =appsvcorg/drupal-nginx-fpm:0.1
2018-03-28 05:33:27.433 INFO  - docker pull returned STDOUT>> 0.1: Pulling from appsvcorg/drupal-nginx-fpm
Digest: sha256:121f2bfe0bd7c1dc1de99ac70042f1597e3db26ba35f24aefb99a45c27bde797
Status: Image is up to date for 10.0.3.195:13209/appsvcorg/drupal-nginx-fpm:0.1

2018-03-28 05:33:27.542 INFO  - Starting container for site
2018-03-28 05:33:27.548 INFO  - docker run -d -p 45567:80 --name xxxxxxx -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=true -e WEBSITE_SITE_NAME=xxxxxxxxxxx -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_INSTANCE_ID=f15b3dda29d5ff3b772exxxxxxxxxxxxxxxx5925935aa0308f2 appsvcorg/drupal-nginx-fpm:0.1  

2018-03-28 05:33:27.549 INFO  - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2018-03-28 05:38:45.668 INFO  - Container logs
2018-03-28T05:33:28.831339151Z PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )
2018-03-28T05:33:28.831373851Z Copyright (c) 1997-2017 The PHP Group
2018-03-28T05:33:28.831391751Z Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
2018-03-28T05:33:28.831399651Z     with Zend OPcache v7.0.19-1, Copyright (c) 1999-2017, by Zend Technologies
2018-03-28T05:38:45.132823951Z cp: cannot create regular file '/home/site/wwwroot/sites/default/settings.php': Permission denied

To fix this I had to give all permission rights using the Kudu debug console in Azure by the following commands

/home>chmod 777 site/wwwroot/sites/default/settings.php 
/home>chmod 777 site/wwwroot/sites/default/files

So it looks like at some random time the container cannot access the settings.php file. This happened two times after a clean new Azure installation. Now it’s fixed with full permissions on the settings.php file and the files folder.

Besides that, the brand-new clean Drupal installation is slow-performing under a S3 Standard Subscription in Azure. In my opinion, for a clean install of Drupal this should be more than enough. But Drupal feels quite slow…..

So for now three questions are popping up:

  1. Does Azure need the full 777 permissions on the settingsphp file en the files folder?  
  2. Is it a known issue that a new out-of-the-box template Azure installation can have these problems? (because I cannot find that much on this issue online)
  3. How can I improve the performance? Is this Azure related as well?
Drupal version: 


Source: https://www.drupal.org/taxonomy/term/1/feed