Wonderfall / dockerfiles

Discontinued. Fork at your will.
Creative Commons Zero v1.0 Universal
392 stars 170 forks source link

Updating permissions takes forever during run #204

Closed AgeraluonDocker closed 6 years ago

AgeraluonDocker commented 7 years ago

When running the container, nextcloud starts updating all file permissions. This takes forever on this image. Does this have to do with me hosting the image on a windows system?

Wonderfall commented 7 years ago

It is untested on Windows. On Linux I just know that the same bug happens with the overlay2 storage driver (it's not forever, but it takes at least 10 minutes).

AgeraluonDocker commented 7 years ago

Interesting... I'm not that versed in the nextcloud sourcecode, but could the the whole permissions process maybe be done when the image is built? A current problem with Docker for windows is that the NTFS windows filesystem does not support permissions. Instead, access to files is blocked within windows itself. That means that docker can only mount files/folders with 755 permission level, and this cannot be changed, neither from the windows host, nor from within the container. I actually had to bypass the part of the code that checks for proper file permissions when nextcloud is being run, so it would start. My guess would be that the initialization code tries to change permissions, then runs into some sort of timeout, than continues with the next file, and so on (the complete process takes about half an hour). Could that be the case?

Btw, thank you for your continuing work on the image. Apart from the first windows-related issues, nextcloud runs well, and I'm sure once I'm done, it'll serve me well!

guillaumedc commented 7 years ago

Yes, it is very slow with overlays2 storage driver on linux. Is it possible to avoid checking permissions at runtime? (assuming there are correct)

Berndinox commented 7 years ago

Got the same Problem! Debian Stretch + overlays2

@guillaumedc I've removed the permissions par: https://github.com/Berndinox/nextcloud12-tempfix However it did NOT work cause these permissions seems to be required

guillaumedc commented 7 years ago

Yes there are required, but already correct in my case because I use a volume and those permissions are not modified between the moment I delete the container and the moment I recreate it.

This permissions check could be optional in my opinion.

Berndinox commented 7 years ago

yes, but... the permissions persists only over mounted volumes! /nextcloud is not mounted just /nextcloud/themes, /config, /apps2, and so on are mounted. The default user is nodoby inside /nextcloud, thats why it does not work for me....

Wonderfall commented 6 years ago

These permissions are needed and perhaps I can review the permissions check to make it faster. But this will still be slow on overlay2fs, so I can't do much on my side. Try to contact the devs of overlay2fs, because it looks like it's rather an issue from them.

bleed2002 commented 6 years ago

just ran into this issue as well on all my newly setup servers (centos 7.4, docker ce 17.09), seems this also applies to the overlay driver. what can i do to work around this issue (eg switch storage driver, upgrade kernel, use xfs over ext4)? any help highly appreciated, thanks!

Server Version: 17.09.0-ce Storage Driver: overlay Backing Filesystem: extfs Supports d_type: true Kernel Version: 3.10.0-693.2.2.el7.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86_64