After updating drupal8 for 8.7.0 and then to 8.7.1 versions i have next errors:

Warning: chmod(): Operation not permitted in Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage->save() (line 76 of core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php).

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

This errors appears for all twig templates and only at first time page loaded. For second and other times no errors and template created in cache folder.

I set 777 permission for all files. Checked files owner. Was Reading many forums and nothing ...


I fixed this problem by updating owner of files, groups only not enough. Before i has owner as vagrant and group as www-data and now www-data for both.

But it's still strange for my. If i refresh page sometimes file generated and created anyway and warnings went one.

| improve this answer | |
  • Yup, permissions is one thing, ownership another. – leymannx Aug 28 '19 at 9:03

I have seen this error a couple of times. Usually it's related to the file system. Most of the times it has worked for me to change the permissions of the files directory to 777.

Otherwise make sure that your private folder is accesible and exists.

| improve this answer | |
  • Thanks for your answer. No problem with permissions I set to 777 for all drupal site files and folders. But it's very strange bacause it's only first time page loading problem for the second and other templates created on file system anc cached. ok, i will check private folder. – DARK_DIESEL May 22 '19 at 10:41

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