Docker4drupal: The file could not be uploaded in Windows 10

Created on 16 Sep 2017  路  5Comments  路  Source: wodby/docker4drupal

Codebase

Drupal 7 - Open Atrium and other mounted codebase

Host OS

Windows 10 Pro

Services

Followed instructions here: http://docker4drupal.readthedocs.io/en/latest/multiple-projects/

Image field

When trying to upload an image using Image field, this what happens:
image

In the console:
image

Media Browser

When trying to upload an image using Media Browser:
image

In the console:
image

But getting sources/image from web seems to download the file successfully. What's going on?

Linux file permission

When changing permissions in Linux, nothing happens
image

Windows: remove read-only

Removing Read-only from /sites/default/files as well as doc root doesn't do anything. Read-only is checked the next time you see directory properties:
image

I've spent several days already trying to remove this impediment in my local project. I really need your help.

All 5 comments

When setting up new Drupal site using wodby/drupal, user and group www-data owns the files, but with wodby/drupal-php it is always root:root. Can anyone pls help me with this? Thanks

Hi,

Do you see this post ? I have a similar problem.

See this: https://github.com/wodby/docker4drupal/issues/167

And i solved my probleme here: https://github.com/wodby/docker4drupal/issues/29#issuecomment-316055081

Lo茂c

not sure i understand why the problem lies in the core file.inc file when Vanilla Drupal images wodby/drupal should be using the same Drupal core files as the Windows-problematic wodby/drupal-php images. if Linux users don't get this problem unlike Windows users then certainly the core Drupal file isn't the culprit, right?

Under Windows there are in general problems with write permissions. Because under Windows all files/directories inside the container belongs to root. And all chown/chmod have no effect, since the changes for this can not be set in Windows (Host for the volumes).

And because the php process in docker4drupal does not run as root, Drupal has no write permissions to the files directory. If the php run as root, files should be writeable (I use this with Drupal 7).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arrubiu picture arrubiu  路  4Comments

VladSavitsky picture VladSavitsky  路  6Comments

Vacilando picture Vacilando  路  9Comments

andrewhorokhovets picture andrewhorokhovets  路  8Comments

suricactus picture suricactus  路  9Comments