1

I wanted to update d8 from 8.0.1 to 8.0.2, but i couldn't run the update.php due to the error "Access Denied". Am logged in as user1 which should have all required privileges.Following the drupal 8 update guide I deleted core and vendor folders with all the files in the drupal root from the the 8.0.1 install, and replaced the same files and folders from the newly downloaded 8.0.2 version.

What could be the solution to this problem?

My Environment: OSX El Captain, nginx 1.8 using the latest config from nginx/drupal, PHP 7.0.2,

See window capture below:

enter image description here

Many Thanks

2
  • I suppose something was logged, somewhere. Can you share that? – cilefen Jan 28 '16 at 14:18
  • @Cilefen thanks but where can I check for the specific logs. – odili Jan 28 '16 at 14:49
1

After several frustrating days I figured the problem was from my configuration. The conf file has "fastcgi_param SCRIPT_FILENAME $request_filename;" instead of "fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;"

Making this correction solved the problem.

Am grateful for all the support.

0

The most common cause of this is the apache user doesn't have permission to see the new Drupal source files. It most likely has nothing to do with the logged in Drupal user.

If you have shell access to the server, you can update the permissions with the following command (run from the Drupal directory):

chmod -R a+r *

This recursively adds read permission for all users without affecting other permissions.

If you don't have shell access, many FTP clients allow you to update the permissions on a group of files.

Hope this helps.

6
  • @ James Shields, thanks for your contrib. Am still working locally using nginx and php-fpm setup on a Mac. I have check permission however and everything seems ok - am running from user directory so with full permission on all files. install script could have spotted permission problem. – odili Jan 28 '16 at 14:37
  • You should have a log file for the site somewhere. On my Linux box it's in /var/log/httpd/, but I've no idea where it will be on a Mac. If you can find this log, it should tell you exactly where access is being denied and why. – James Shields Jan 28 '16 at 14:51
  • @Cilefen, Here is the log: 2016/01/26 23:20:19 [error] 32229#0: *4504 FastCGI sent in stderr: "Access to the script '/Users/chii/sites/eve/update.php/selection' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 127.0.0.1, server: eve.dev, request: "GET /update.php/selection HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "eve.dev", referrer: "eve.dev/update.php" – odili Jan 28 '16 at 15:28
  • You should probably review your file permissions as described in the answer. – cilefen Jan 28 '16 at 19:20
  • I have re-applied the permissions as suggested by @ James, but without success. '○ → sudo chmod -R a+r * Password: ' – odili Jan 28 '16 at 20:37
0

Another solution is try to open error log in /var/log/nginx/

I've discover that this is cause from SELinux. (If you're using CentOS)

Solution: nginx - Unable to open primary script

PS: For anyone who encounter this issue. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.