Can't get UMASK working
Hi,
just upgraded to the latest coppit/docker-filebot version and it seems something has changed in the handling of umask.
I start the container with docker-compose with the following config:
filebot:
image: coppit/filebot
container_name: filebot
environment:
- GROUP_ID=1000
- USER_ID=1000
- UMASK=0022
volumes:
- /data/app-data/filebot:/config:rw
- /data/ffffff:/input:rw
- /data/gggg:/output:rw
restart: unless-stopped
I've also added this to the end of my filebot.conf:
UMASK=0022
USER_ID=1000
GROUP_ID=1000
But when starting I see in the logs:
[2017-12-18 13:27:48] FileBot: CONFIGURATION:
[2017-12-18 13:27:48] FileBot: WATCH_DIR=/input
[2017-12-18 13:27:48] FileBot: SETTLE_DURATION=10
[2017-12-18 13:27:48] FileBot: MAX_WAIT_TIME=60
[2017-12-18 13:27:48] FileBot: MIN_PERIOD=120
[2017-12-18 13:27:48] FileBot: COMMAND=bash /files/filebot.sh
[2017-12-18 13:27:48] FileBot: USER_ID=1000
[2017-12-18 13:27:48] FileBot: GROUP_ID=1000
[2017-12-18 13:27:48] FileBot: UMASK=0000
[2017-12-18 13:27:48] FileBot: DEBUG=False
[2017-12-18 13:27:48] FileBot: IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=False
[2017-12-18 13:27:48] FileBot: Starting monitor for FileBot
[2017-12-18 13:27:48] FileBot: Waiting for new change
It is a bit annoying because folder permissions are now 777 and files are 666. Anyone know how to fix this?
Setting it in the filebot.conf isn't going to be effective. The startup script appends the environment variables to the end of filebot.conf, overriding whatever you put in there. The resulting file is in /files/FileBot.conf within the container.
Setting it as an environment variable works for me. I added -e UMASK=0022 to my docker run command, and it seems to be passed all the way down:
$ docker inspect --format '{{ index (index .Config.Env) 1 }}' FileBot
UMASK=0022
$ docker exec -it FileBot bash -c 'echo $UMASK'
0022
$ docker exec -it FileBot tail -n3 /files/FileBot.conf
USER_ID=99
GROUP_ID=100
UMASK=0022
And in my logs:
[2018-01-21 11:39:39] FileBot: USER_ID=99
[2018-01-21 11:39:39] FileBot: GROUP_ID=100
[2018-01-21 11:39:39] FileBot: UMASK=0022
I would make sure you're using the latest container version, and try launching it without docker compose.
I'll leave this open a bit longer to give you a chance to follow up, but it doesn't appear to be a bug in the container.