-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Podman creates a rundir with insufficient permissions #23062
Comments
There is probably no user session for the Are you sure you want to run podman as the If you really want it, I suggest enabling lingering mode for that user ( |
I want to have a rootless container. Therefore the HAProxy container is running in the user space of the the |
strange that the do you get the same error if you run Can you temporarily turn off selinux to see if it is blocking the access to the directory? |
Turning off SELinux, does not change the behavior. That is something I have already tested.
Running the script as
Yes, I get the same error running it manually with
But, after stopping keepalived and removing the
In this case, it gets created with sufficient permissions As soon as I remove the rundir and start the keepalived service again, Podman recreates it with insufficient permissions:
It seems that only running the script from within keepalived causes this issue. |
it smells like keepalived is using the wrong umask. Can you try to override the umask value to something like 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 |
@romanwoessner had a chance to try overriding the umask value? |
Thanks for the hint! I have tried overriding the umask and it works.
I am still wondering why the rundir is created in the home directory. I have other RHEL machines with the same versions of podman and keepalived that behave differently and don't need this customization in the configuration. |
the rundir is created in the home directory when Podman cannot create it under the user run directory ( I suggest to report an issue to keepalived as well, since the default umask prevents the owner itself to access the created directories. I am closing the issue as it appears the problem is not in Podman, but feel free to comment further |
Issue Description
I have keepalived running on RHEL 9.4 which runs "podman ps" in a check script to monitor a rootless HAProxy container. Running the check script interactively in a bash works, but running it from within keepalived fails with an exit code 1.
During debugging, I saw that podman creates a rundir in the user's home directory and then runs into an error - presumably due to insufficient permissions.
Steps to reproduce the issue
Steps to reproduce the issue
/etc/keepalived/keepalived.conf
/usr/libexec/keepalived/haproxy_check.sh
systemctl restart keepalived.service
Describe the results you received
Keepalived fails to run its check script:
Modifying the check script to write its stdout and stderror to a file...
...reveals this error message:
ls -l
on/home/ansible
:What is the purpose of this rundir and why does podman create it beeing called from within the keepalived check script?
Describe the results you expected
podman ps returns an exit code 0
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting
The text was updated successfully, but these errors were encountered: