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

Can't get UMASK working #19

Open
emilb opened this issue Dec 18, 2017 · 1 comment
Open

Can't get UMASK working #19

emilb opened this issue Dec 18, 2017 · 1 comment

Comments

@emilb
Copy link

emilb commented Dec 18, 2017

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?

@coppit
Copy link
Owner

coppit commented Jan 21, 2018

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.

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

2 participants