filebot / filebot-docker

Docker build files for FileBot
https://hub.docker.com/r/rednoah/filebot/
Apache License 2.0
55 stars 18 forks source link

Permission issue with watcher #14

Closed allexoll closed 2 years ago

allexoll commented 2 years ago

after updating watcher to latest image, i'm suddenly getting permission errors for the watched folder. This was working before, but does not anymore

I've tried giving it the PUID & PGID that matches the permissions on the folder, but that does not succeed. from inside the container, if i do id i get:

uid=0(root) gid=0(root) groups=0(root)

but if I ls -la on the watched folder i get the correct listing:

drw-r--r-- 1 filebot users  3718 Oct 20 20:16 'Download Station'

same user/group for the permanent license folder

but nonetheless i get

filebot-watcher | Setting up watches.
filebot-watcher | Couldn't watch /video/Download Station: Permission denied

Any idea what i should check to see where the issue comes from?

rednoah commented 2 years ago

If you do PUID=0 then everything will run as root (inside the container) and that is the previous default behaviour: https://github.com/filebot/filebot-docker/blob/master/generic/opt/bin/run-as-user#L4

If you do PUID=1000 (or any other non-zero UID) then the new behaviour will kick in and run filebot with non-root permissions and that is the new default behaviour: https://github.com/filebot/filebot-docker/blob/master/generic/opt/bin/run-as-user#L10

docker always runs everything as root, and switching to a different user or not is entirely up to the ENTRYPOINT, so if you enter with bash, then you will always run as root unless you explicitly switch user:

uid=0(root) gid=0(root) groups=0(root)

What UID and GID does this user have? What PUID and PGID environment variables did you set for the docker container?

drw-r--r-- 1 filebot users  3718 Oct 20 20:16 'Download Station'
allexoll commented 2 years ago

I had set PUID=1026 and PGID as 100 to match my user.

I set PUID as 0 and that seems to have fixed it for now, thanks for the detail explanation!