Permission problem with docker compose volumes for owncloud under Windows

Steps to reproduce

1.Get default docker-compose of owncloud
2.Change volumes parameter of owncloud to " - ./data:/mnt/data"
3.run in powerShell docker-compose up
owncloud:

dockerCompose services

owncloud:
image: owncloud/server:{OWNCLOUD_VERSION} restart: always ports: - {HTTP_PORT}:8080
depends_on:
- db
- redis
environment:
- OWNCLOUD_DOMAIN={OWNCLOUD_DOMAIN} - OWNCLOUD_DB_TYPE=mysql - OWNCLOUD_DB_NAME=owncloud - OWNCLOUD_DB_USERNAME=owncloud - OWNCLOUD_DB_PASSWORD=owncloud - OWNCLOUD_DB_HOST=db - OWNCLOUD_ADMIN_USERNAME={ADMIN_USERNAME}
- OWNCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD}
- OWNCLOUD_MYSQL_UTF8MB4=true
- OWNCLOUD_REDIS_ENABLED=true
- OWNCLOUD_REDIS_HOST=redis
healthcheck:
test: [ā€œCMDā€, ā€œ/usr/bin/healthcheckā€]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ./data:/mnt/data

Expected behaviour

1.owncloud should be up and running.
2. All files should be stored under passed ā€œ./dataā€ on host

Actual behaviour

  1. Under ./data location there are created 4 folder (apps, configs, files, sessions)
  2. Servis is restarting with info:
    owncloud_1 | Waiting for Redis…
    owncloud_1 | services are ready!
    owncloud_1 | Writing config file…
    owncloud_1 | Fixing base perms…
    owncloud_1 | Fixing data perms…
    owncloud_1 | Fixing hook perms…
    owncloud_1 | Upgrading server database…
    owncloud_1 | Console has to be executed with the user that owns the file config/config.php
    owncloud_1 | Current user: www-data
    owncloud_1 | Owner of config.php: root
    owncloud_1 | Try adding 'sudo -u root ’ to the beginning of the command (without the single quotes)
    owncloud_1 | dpkg: error: --compare-versions takes three arguments:
    owncloud_1 |
    owncloud_1 | Type dpkg --help for help about installing and deinstalling packages [];
    owncloud_1 | Use ā€˜apt’ or ā€˜aptitude’ for user-friendly package management;
    owncloud_1 | Type dpkg -Dhelp for a list of dpkg debug flag values;
    owncloud_1 | Type dpkg-deb --help for help about manipulating .deb files;
    owncloud_1 | Options marked [
    ] produce a lot of output - pipe it through ā€˜less’ or ā€˜more’ !
    owncloud_1 | Writing objectstore config…
    owncloud_1 | Writing php config…
    owncloud_1 | dpkg: error: --compare-versions takes three arguments:
    owncloud_1 | Type dpkg --help for help about installing and deinstalling packages [
    ];
    owncloud_1 | Use ā€˜apt’ or ā€˜aptitude’ for user-friendly package management;
    owncloud_1 | Type dpkg -Dhelp for a list of dpkg debug flag values;
    owncloud_1 | Type dpkg --force-help for a list of forcing options;
    owncloud_1 | Type dpkg-deb --help for help about manipulating .deb files;
    owncloud_1 |
    owncloud_1 | Options marked [
    ] produce a lot of output - pipe it through ā€˜less’ or ā€˜more’ !
    owncloud_1 | Writing apache config…
    owncloud_1 | Enabling cron background…
    owncloud_1 | Console has to be executed with the user that owns the file config/config.php
    owncloud_1 | Current user: www-data
    owncloud_1 | Owner of config.php: root
    owncloud_1 | Try adding 'sudo -u root ’ to the beginning of the command (without the single quotes)

Server configuration

Operating system:
Windows10 ,
Docker 2.2.0.3 with linux container
owncloud/server:10.2.1
ownCloud version: owncloud/server:10.2.1

Hey,

maybe the ownCloud docker isn’t prepared to be running on a windows? Have you tried running it on a linux host?

1 Like

Hi,
Thanks for reply.
As i tried to write in Operating system section - I am using linux version of docker on Windows.
Sure - default docker-compose works like a charm on Ubuntu with docker, but for some reason this is not working on Windows.
Any idea how to force it to start working?

Having the same issue here. Did anyone manage to get this working in the end?

Unfortunately i losr 3 days and decided to switch to Linux as a host system.

1 Like