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

sudoers: Permission denied #123

Open
SRJ9 opened this issue Jan 10, 2019 · 2 comments
Open

sudoers: Permission denied #123

SRJ9 opened this issue Jan 10, 2019 · 2 comments

Comments

@SRJ9
Copy link

SRJ9 commented Jan 10, 2019

I got this error when I run the container (any version: latest, 9:6, ...).

OS: Debian 9.6
Kernel: 4.9.0-8-amd64

/var/lib/docker is a mount point (partition of 92GB only with that)

Initializing datadir...
Initializing certdir...
Initializing logdir...
Initializing rundir...
Setting resolv.conf ACLs...
Initializing database...
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

In other server with same OS is working OK.

@YouSysAdmin
Copy link

YouSysAdmin commented Dec 29, 2020

This is not a system problem, it is a container security context issue.

Fix:
docker/podman --cap-add audit_write ....

fix for kubernetes:

deployment/statefulset etc:

...
      containers:
        - name: postgresql
          image: sameersbn/postgresql:latest
          
          securityContext:
            capabilities:
              add: ["AUDIT_WRITE"]
....

@mikeqoo1
Copy link

mikeqoo1 commented Mar 9, 2022

thx help

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

3 participants