Results 1 to 3 of 3

Thread: Drupal 8 install fails: writing permissions problem?

  1. #1
    Guest

    Question Drupal 8 install fails: writing permissions problem?

    Hi,

    I've been fiddling around for a few days, and I'm at a loss. I tried to migrate my Drupal 8 website from local to Altervista, but I failed:

    I managed to import the database in phpmyadmin, and I copied all my files to the root. I adjusted settings.php. The website works fine. Al pages, forms, buttons show and do what they are supposed to do.
    But when I try to log in (as admin, uid 1), i get 'access denied: you are not authorized to access this page'. This message is different from what I get with an unrecognised username/password combination ('username/pw are not recognised'). I couldn't find a way to make it work.

    Here is what I've tried:
    - different browsers (default is chrome, but tried windows explorer and firefox)
    - checked cookie_domain (and clearing cookies)
    - checked settings.php
    - checked .htaccess (rewrites)
    - uninstalled all modules and tried again
    - changed permissions of all files and directories on server (via ftp) to 777
    - switched on/off clean urls
    - cleared caches / sessions / flood tables in database
    - created new user + password

    I gave up and decided to do a clean install of Drupal 8.4.4 instead of migrating my site, but that failed too. I uploaded all files to the root, emptied the database and started the install. But after choosing language and profile, I get this error:

    Warning: touch(): Utime failed: Operation not permitted in Drupal\Component\PhpStorage\MTimeProtectedFastFile Storage->save() (line 100 of core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php).


    After that, my database contains 23 tables and a settings.php file is created. An attempt to log in on the site fails ('unrecognized un/pw: never set an admin during install). Clicking the 'forgot password' leads to an 'Internal Server Error'.


    Is there something particular about permissions on Altervista that makes installing Drupal problematic? I am really out of ideas of what to try next... Help?

  2. #2
    alemoppo is offline AlterVista Staff
    Join Date
    Feb 2010
    Location
    IT
    Posts
    688

    Default

    Quote Originally Posted by probeerseltje View Post
    I gave up and decided to do a clean install of Drupal 8.4.4 instead of migrating my site, but that failed too.

    Before installation:

    • Check .htaccess (rewrites)
    • core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php at line 100 replace:
      PHP Code:
      $result &= touch($directory . '/', $mtime);
      with:
      PHP Code:
      //$result &= touch($directory . '/', $mtime);
    • core/lib/Drupal/Core/Session/SessionConfiguration.php at line 73 replace:
      PHP Code:
      return $prefix . $this->getUnprefixedName($request);
      with:
      PHP Code:
      return 'PHPSESSID';//$prefix . $this->getUnprefixedName($request);


    Bye!

  3. #3
    Guest

    Default

    Yeeeeessss!!!! Thank you SO much!! I would never have come up with that myself. :-) It works now.
    Another thing it complains about is opcache, but I guess that's just not installed on the server, right? It's not a problem, just something it mentions upon install.

    EDIT: in case someone else has the same problem: editing the two files in core also solves the 'access denied' problem in the migrated existing site. :-)
    Last edited by probeerseltje; 01-25-2018 at 07:33 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO