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

When running inadyn as unprivileged user, it will complain about not able to chown the cache-dir. #309

Closed
leonyu opened this issue Apr 17, 2020 · 3 comments
Milestone

Comments

@leonyu
Copy link

leonyu commented Apr 17, 2020

When running inadyn as unprivileged user, it will complain about not able to chown the cache-dir.

Cannot change owner of cache directory /tmp/.inadyn/ to 0:0, skipping: Operation not permitted

Can be produced with the following docker/docker-compose setup:

services:
  inadyn:
    image: troglobit/inadyn:latest
    entrypoint: inadyn --foreground --cache-dir=/tmp/.inadyn/ --no-pidfile
    volumes:
      - ./inadyn.conf:/etc/inadyn.conf
    user: nobody:nogroup
@troglobit
Copy link
Owner

Thanks for the report. Hopefully someone can verify and provide an idea of how to proceed, I don't use the docker build myself atm. If nobody steps up I'll have a look at it right before the next release.

@troglobit troglobit added this to the v2.7 milestone Apr 26, 2020
@troglobit troglobit modified the milestones: v2.7, v2.8 Apr 26, 2020
@leonyu
Copy link
Author

leonyu commented Apr 26, 2020

Not really related to docker. Should probably be able to reproduce with the following (not tested):

sudo -u nobody -g nogroup inadyn -F ./inadyn.conf --foreground --cache-dir=/tmp/ --no-pidfile

./inadyn.conf need to be readable by nobody

Unless cache-dir is at its default location (/var/run/inadyn/), inadyn shouldn't try to chown the cache directory. The cache directory might be shared with other applications (e.g. /tmp), or maybe mapped from NFS or other containers with different uid/pid.

@troglobit
Copy link
Owner

Should be fixed as of a3616bf, please let me know if the problem persists.

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

No branches or pull requests

2 participants