filebrowser-docker icon indicating copy to clipboard operation
filebrowser-docker copied to clipboard

User docker-compose

Open Erriez opened this issue 4 years ago • 4 comments

Thanks for creating this great Docker. I'm running it on a Raspberry Pi4 aarch64 with docker-compose.yml and I'd like to edit / create files as normal user:

  filebrowser:
    image: hurlenko/filebrowser
    container_name: filebrowser
    restart: always
    user: 1000:1000
    volumes:
      - ${VOLUME_DIR}/filebrowser/config:/config
      - ${VOLUME_DIR}/share:/data

Creating the container results in: filebrowser | 2021/02/04 20:53:30 open /config/filebrowser.db: permission denied

I found a workaround to run the container without user: first as root:root which creates ${VOLUME_DIR}/filebrowser/config/filebrowser.db. Then sudo chown 1000:1000 -R ${VOLUME_DIR}/filebrowser/config/filebrowser.db and recreate the container with user: 1000:1000. Then it works.

What could be the problem?

Erriez avatar Feb 04 '21 21:02 Erriez

Run chown on the directory. Docker creates it as root.

Dulanic avatar Mar 02 '22 17:03 Dulanic

Is there a decent solution to this that doesn't require changing users back and forth?

luandro avatar Nov 09 '22 23:11 luandro

Same issue - I get the same error.

broomwalker avatar May 26 '23 08:05 broomwalker

Same

Johannes-m-TK avatar Oct 06 '23 16:10 Johannes-m-TK