Docker: local external storage not working: You don't have permission to upload or create files here

Created on 25 Jan 2018  路  3Comments  路  Source: nextcloud/docker

I am using the nginx-mariadb-apache docker-compose file and it works great.

I mounted an extra volume by adding this line to the app service

  app:
    image: nextcloud:apache
    restart: always
    volumes:
      - nextcloud:/var/www/html
      - ./media:/media #this line I added
    environment:
      - VIRTUAL_HOST=moesattler.com
      - LETSENCRYPT_HOST=moesattler.com
      - [email protected]
      - MYSQL_HOST=db
    env_file:
      - db.env
    depends_on:
      - db
    networks:
      - proxy-tier
      - default

And while nextcloud is able to read it's content, it is is not able to write in it.
I tried to let everyone write by executing this on the host

sudo chmod -R 777 media/

still no luck. Any idea on how to solve this?

help wanted

Most helpful comment

Make sure that the folder is owned/writable by www-data (uid 33 on Debian, uid 82 on Alpine).

All 3 comments

Had a similar issue with ntfs-3g filesystem as external storage.
I can workaround this issue by recreating the folder I want to write to on the disk using a file explorer. After that nextcloud can write to it.
I did not investigate the cause.

Can confirm that this issue exists as well.

Make sure that the folder is owned/writable by www-data (uid 33 on Debian, uid 82 on Alpine).

Was this page helpful?
0 / 5 - 0 ratings