codingdavinci / relaunch2018

This is the new Coding da Vinci website (online since September 2020).
https://codingdavinci.de
GNU General Public License v2.0
1 stars 1 forks source link

Permission Denied mkdir() #255

Closed mbuechner closed 3 years ago

mbuechner commented 3 years ago

There are tons of warnings because Drupal is not able to create a directory. I don't know what's going on and logging is not very helpful 'mkdir(): Permis...', '/var/www/html/w...',. Has something to do with Twig. Do you have any ideas where Drupal likes to add a folder, @Snater ?

User warning: mkdir(): Permission Denied in Drupal\Component\PhpStorage\FileStorage->createDirectory() (Zeile 145 in /var/www/html/web/core/lib/Drupal/Component/PhpStorage/FileStorage.php)

#0 /var/www/html/web/core/includes/bootstrap.inc(600): _drupal_error_handler_real(512, 'mkdir(): Permis...', '/var/www/html/w...', 145, Array)
#1 [internal function]: _drupal_error_handler(512, 'mkdir(): Permis...', '/var/www/html/w...', 145, Array)
#2 /var/www/html/web/core/lib/Drupal/Component/PhpStorage/FileStorage.php(145): trigger_error('mkdir(): Permis...', 512)
#3 /var/www/html/web/core/lib/Drupal/Component/PhpStorage/FileStorage.php(95): Drupal\Component\PhpStorage\FileStorage->createDirectory('sites/default/f...', 511)
#4 /var/www/html/web/core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php(66): Drupal\Component\PhpStorage\FileStorage->ensureDirectory('sites/default/f...')
#5 /var/www/html/web/core/lib/Drupal/Core/Template/TwigPhpStorageCache.php(111): Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage->save('5f5a3e432365e_s...', '<?php\n\nuse Twig...')
#6 /var/www/html/vendor/twig/twig/src/Environment.php(487): Drupal\Core\Template\TwigPhpStorageCache->write('5f5a3e432365e_s...', '<?php\n\nuse Twig...')
#7 /var/www/html/vendor/twig/twig/src/Environment.php(445): Twig\Environment->loadClass('__TwigTemplate_...', 'core/themes/sev...', NULL)
#8 /var/www/html/web/core/themes/engines/twig/twig.engine(64): Twig\Environment->loadTemplate('core/themes/sev...')
#9 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/sev...', Array)
#10 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Theme\ThemeManager->render('status_messages', Array)
#11 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(200): Drupal\Core\Render\Renderer->doRender(Array, true)
#12 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(156): Drupal\Core\Render\Renderer->render(Array, true)
#13 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#14 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(157): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#15 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(171): Drupal\Core\Render\Renderer->renderPlain(Array)
#16 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipe.php(693): Drupal\Core\Render\Renderer->renderPlaceholder('callback=Drupal...', Array)
#17 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipe.php(547): Drupal\big_pipe\Render\BigPipe->renderPlaceholder('callback=Drupal...', Array)
#18 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipe.php(305): Drupal\big_pipe\Render\BigPipe->sendPlaceholders(Array, Array, Object(Drupal\Core\Asset\AttachedAssets))
#19 /var/www/html/web/core/modules/big_pipe/src/Render/BigPipeResponse.php(112): Drupal\big_pipe\Render\BigPipe->sendContent(Object(Drupal\big_pipe\Render\BigPipeResponse))
#20 /var/www/html/vendor/symfony/http-foundation/Response.php(374): Drupal\big_pipe\Render\BigPipeResponse->sendContent()
#21 /var/www/html/web/index.php(20): Symfony\Component\HttpFoundation\Response->send()
#22 {main}

.
Snater commented 3 years ago

What is the way to reproduce this? As to the stack trace this seems to be related to the BigPipe module.

@mbuechner Found the strack trace on https://community.bitnami.com/t/getting-error-user-warning-mkdir-permission-denied-in-drupal/59772 where it seems to have been tracked down to a ownership issue. Could you please check?

mbuechner commented 3 years ago

What is the way to reproduce this?

I don't know. Just read that in the logs. Looks like the error is gone away. I don't know.

tracked down to a ownership issue

Set chown -R www-data:www-data /var/www/html/web/sites/default/files again.