Comments (8)
There is probably no user session for the ansible
user so Podman fall backs to create the rundir in the home directory.
Are you sure you want to run podman as the ansible
user and not as root
?
If you really want it, I suggest enabling lingering mode for that user (loginctl enable-linger ansible
)
from podman.
I want to have a rootless container. Therefore the HAProxy container is running in the user space of the the ansible
user. Lingering mode is already activated for this user.
from podman.
strange that the /home/ansible/rundir
directory is created when there is a user session.
do you get the same error if you run sudo -u ansible /usr/libexec/keepalived/haproxy_check.sh
manually?
Can you temporarily turn off selinux to see if it is blocking the access to the directory?
from podman.
Turning off SELinux, does not change the behavior. That is something I have already tested.
$ sestatus
SELinux status: disabled
Running the script as ansible
user works as exptected:
$ /usr/libexec/keepalived/haproxy_check.sh
59f82621245d
Yes, I get the same error running it manually with sudo -u ansible
:
$ sudo -u ansible /usr/libexec/keepalived/haproxy_check.sh
ERRO[0000] unable to make rootless runtime: mkdir /home/ansible/rundir/containers: permission denied
But, after stopping keepalived and removing the rundir
with its 0600
permissions, it works:
$ sudo systemctl stop keepalived.service
$ rm -rf ~/rundir
$ sudo -u ansible /usr/libexec/keepalived/haproxy_check.sh
59f82621245d
$ ls -la ~/rundir
drwx------ 3 ansible ansible 24 25. Jun 09:49 .
drwx------. 12 ansible ansible 4096 25. Jun 09:49 ..
drwx------ 2 ansible ansible 6 25. Jun 09:49 containers
In this case, it gets created with sufficient permissions 0700
.
As soon as I remove the rundir and start the keepalived service again, Podman recreates it with insufficient permissions:
$ rm -rf ~/rundir
$ sudo systemctl start keepalived.service
$ sudo ls -la /home/ansible/rundir
drw------- 2 ansible ansible 6 25. Jun 09:51 .
drwx------. 12 ansible ansible 4096 25. Jun 09:51 ..
It seems that only running the script from within keepalived causes this issue.
I appreciate any help.
from podman.
it smells like keepalived is using the wrong umask.
Can you try to override the umask value to something like 0022
?
EDIT:
if https://github.com/acassen/keepalived/blob/master/lib/utils.c#L73 is the default umask used by keepalived, then that explains the missing exec bit set for the directory
from podman.
@romanwoessner had a chance to try overriding the umask value?
from podman.
Related Issues (20)
- Containerfile.in not automatically pre-processed HOT 2
- Swagger docs mismatch for /images/{name}/push and libpod endpoint HOT 2
- newuidmap Fails with “Operation not permitted” When Running Podman Inside amd64 Podman container on macOS with Rosetta HOT 5
- podman : Depends: containers-common (>= 4:1) but it is not going to be installed HOT 1
- cannot remove images on MacOS HOT 5
- Podman v5 no longer builds Dockerfiles with build args used as --platform in FROM instruction HOT 5
- quadlet: add Container-spec StopSignal mapping to podman --stop-signal HOT 1
- podman system renumber fails if a volume exists
- Podman doesn't use a local image in `FROM` in Dockerfile/Containerfile HOT 13
- `podman-catatonit` cannot be installed in a UBI9 based container image HOT 1
- macOS vm virtiofs concurrency issue HOT 8
- podman build -o type=tar,dest=- mixes tar and messages HOT 1
- [Quadlet] [rootless] dependencies not working HOT 2
- podman machine ssh ignore machine name on Windows/HyperV HOT 2
- Behavior of `podman run --cidfile foo.cid` is not compatible with `docker run --cidfile foo.cid` HOT 1
- TmpFS gets dirty with `exit` files
- Error: writing file `/proc/450976/gid_map`: Operation not permitted: OCI permission denied HOT 5
- podman compose not working correctly for some compose yamls HOT 29
- podman commit on containers with a large files throws error: io: read/write on closed pipe HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from podman.