Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User docker-compose #8

Open
Erriez opened this issue Feb 4, 2021 · 4 comments
Open

User docker-compose #8

Erriez opened this issue Feb 4, 2021 · 4 comments

Comments

@Erriez
Copy link

Erriez commented Feb 4, 2021

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?

@Dulanic
Copy link

Dulanic commented Mar 2, 2022

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

@luandro
Copy link

luandro commented Nov 9, 2022

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

@broomwalker
Copy link

Same issue - I get the same error.

@Johannes-m-TK
Copy link

Same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants