0

Did clean installation of ddev on my Mac.

Set up Drupal 8 project and have problems with file permissions on sites/default/files folder. For some reason it resets the permissions I set (chmod -R a+w) and web server can't write to this folder afterwards.

Files are owned by uid_1000 gid_50.

Example of the message

Warning: file_put_contents(sites/default/files/php/twig/5c1ad9b345ce5_status-messages.html.twig_3IhisVoQLOYIb64NBegMDuHJs/.htaccess): failed to open stream: Permission denied in Drupal\Component\PhpStorage\FileStorage->ensureDirectory() (line 123 of core/lib/Drupal/Component/PhpStorage/FileStorage.php).
Yuriy Gerasimov
  • 123
  • 1
  • 6
  • We can probably help you more easily in Drupal slack (#ddev channel), but happy to help you here. If you're using sudo (for anything) please don't... But I haven't ever seen this happen on the mac. Can you give me a complete recipe to recreate this, starting with a plain vanilla Drupal install? – rfay Dec 20 '18 at 00:27
  • If you're using any custom config (or if you're using the experimental just-released webcache_enabled) please roll back any of those to get things sorted on a plain-vanilla setup first. – rfay Dec 20 '18 at 00:29
  • I have ran ddev on existing config (APIVersion v1.1.1). Let me remove configuration completely and re-run creation of containers. Maybe there was something wrong with older configuration. – Yuriy Gerasimov Dec 20 '18 at 00:36
  • Has this been resolved? I think I am running into a similar issue with permissions after ddev ssh except my files say they are ALL owned by root... Trying to chmod hasn't helped me so far. – Tyler Davis Feb 26 '19 at 23:31
  • Can anybody help continuous Waring i am getting : Warning: file_put_contents(sites/default/files/php/twig/5ece61b1d471c_menu.html.twig_ms5R93s-wUkYaDlrCxbz7FVzS/.htaccess): failed to open stream: Permission denied in Drupal\Component\PhpStorage\FileStorage->ensureDirectory – Anisha Shaikh May 27 '20 at 13:02

0 Answers0