mickael-kerjean / filestash

🦄 A file manager / web client for SFTP, S3, FTP, WebDAV, Git, Minio, LDAP, CalDAV, CardDAV, Mysql, Backblaze, ...
https://www.filestash.app/
GNU Affero General Public License v3.0
10.36k stars 767 forks source link

[bug] Permission related issue for config.json #736

Open xd003 opened 2 months ago

xd003 commented 2 months ago
  filestash:
    image: machines/filestash
    container_name: filestash
    restart: unless-stopped
    expose:
      - 8334
    volumes:
      - /opt/containers/filestash:/app/data/state/

When deploying filestash using the docker compose. it reports about the error mentioned in the title. The real problem is that filestash container doesn't start as the user i am running the docker compose. It runs as another user which is why the permission related issue. For instance, i am runnning docker with UID/GID 1002 while filestash container runs as UID/GID 1000

grozadanut commented 2 months ago

I have the same permission issue as you. My problem is that I am trying to mount a local folder in the docker container using bind mounts, so I can expose it through Filestash. But filestash cannot open this folder inside the docker container, because it expects a user called filestash to own it, and there is no user filestash on the host.

As a reference, my stack is:

filestash:
    image: machines/filestash
    environment:
      - APPLICATION_URL=files.{{ domain }}
      - ONLYOFFICE_URL=http://onlyoffice
    volumes:
      - filestash:/app/data/state/
      - /mnt:/mnt
    networks:
      - web
      - local
    deploy:
      mode: replicated
      replicas: 1
      labels:
      - "traefik.enable=true"
      - "traefik.docker.network=web"
      - "traefik.http.routers.filestash.rule=Host(`files.{{ domain }}`)"
      - "traefik.http.routers.filestash.entrypoints=websecure"
      - "traefik.http.services.filestash.loadbalancer.server.port=8334"
      - "traefik.http.routers.filestash.service=filestash"
      - "certbot.domain=files.{{ domain }}"
lukeallister commented 3 weeks ago

Did anyone figure out a workaround to this one in the docker compose file?

xd003 commented 3 weeks ago

Did anyone figure out a workaround to this one in the docker compose file?

Yes, just change the user & group of the filestash volume to 1000 before running filestash container