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

DAC_OVERRIDE is required to work properly #334

Open
Riktastic opened this issue Oct 25, 2022 · 2 comments
Open

DAC_OVERRIDE is required to work properly #334

Riktastic opened this issue Oct 25, 2022 · 2 comments

Comments

@Riktastic
Copy link

Hi there! I am trying to upgrade the security of my docker-compose files by limiting capabilities. The problem I am facing is that many containers require DAC_OVERRIDE to work properly. I've tried to mitigate this by using SETUID/GID and CHOWN while setting the proper UID and GID in the docker-compose.yml. But whatever I try, I will always receive a "Permission denied". It works just fine without specifying any capability drops and when specifying the "drop all" while allowing DAC_OVERRIDE. <any containers will work properly: Navidrome, Audiobookshelf without any capabilities. But many require Postgres or MariaDB. And these two won't work without DAC_OVERRIDE, even when running it for the first time.

I'm scared about the damage DAC_OVERRIDE can cause.

Is there someone who is facing the same issue or might know a solution?

@AkihiroSuda
Copy link
Member

Is this relevant to this repo?

@Riktastic
Copy link
Author

Riktastic commented Nov 2, 2022

Hi there, I'm still trying to provide a proof-of-concept. Just to verify my theory if my UIDMap starts at 16536 and I assign UID 2002 to my Docker container using the --user parameter, it will run as 16536 + 2002 and access files within a bind mount as 16536 + 2002? @AkihiroSuda

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