2

I have a strange issue with my drupal 8 installation on Ubuntu 18.4.

The Drupal Webform-module is not able to create needed directories. Therefore file upload fails.

The error occurs

  • if I use the Drupal private file system (like recommended), which is for security reasons located outside of (virtual)-servers web root.
  • only at the production server, not at my local development machine.

Therefore it has to be a server configuration issue.

What I have tried:

  • Configuring and using public file system (located within web root): it works, but is a security risk, therefore not really a solution.
  • Checked file owner and permission:
    • Web server runs as php-fpm under ftp-user-account, checked with php_info().
    • all files are 755 as recommended
    • all files owned by the ftp-user, under which the web server runs
  • Tested with chmod to 777 : no effect, still fails.
  • Created needed directories by hand with terminal. This was no problem. Reaction: file upload is possible, script is able to write files there. But it ist not a solution, because the script needs creating own directories at runtime with names I cannot predict.
  • Added the path to private file system to php's open_basedir directive: no difference, upload still fails, cannot create directories.
  • Searching on the web found 2 other similar Questions -> I am not alone, but no one answered.
  • Asked at drupal.stackexchange.com, but they say it's not a drupal but a server configuration issue.

My Questions:

  1. Is there any difference at Unix system level or for PHP between writing files (works) and creating directories (fails)?
  2. Is there any apache directive which makes such difference?
  3. Is there any php-ini variable I could check and change to make this work?

closed as off-topic by Michael Hampton Mar 10 at 18:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • Removing the word 'plesk' from your question doesn't change the fact that plesk does weird things to your system and that any answer that would apply to a non-plesk system isn't going to help you. – Jenny D Mar 11 at 9:26
  • This error may perhaps be, but my final three concrete questions are not more related to plesk as if my skin is white or black. I can understand, that you don't want specific plesk-related questions here. I accept this. But I want to learn and asked for a direction to think. – James Butler Mar 11 at 10:09
  • Generally speaking, having more than one question in a question is frowned upon and may be another reason to close this post. And at least the second and third question are related to Plesk - since it changes stuff in Apache under your feet so that editing a config file may not actually have any effect. – Jenny D Mar 11 at 10:37
  • Also, questions about php.ini are programming questions and belong on StackOverflow. – Jenny D Mar 11 at 10:37
  • As for question 1, generally speaking if you can create a file in a directory you can also create a subdirectory in that same directory. There are ways to limit that though. – Jenny D Mar 11 at 10:38