Is it possible to have execute permissions on /tmp for kube play created pods? #19859
Replies: 3 comments 3 replies
-
Do you have a simple reproducer kube.yaml file? |
Beta Was this translation helpful? Give feedback.
-
Have the same issue with tmpfs being mounted noxec, and failing when running an elasticsearch container. Will be nice if there was a way to tell podman to make a mount exec. |
Beta Was this translation helpful? Give feedback.
-
I have a simple reproducible example. It seems the upstream image has executable files inside /var/tmp/. Not how I'd do it, but neither here nor there (and I have hit similar problems when using dev containers. General OS packages may require +x on /tmp for building and the like, so I have remounted when on the inside). apiVersion: v1
kind: Pod
metadata:
creationTimestamp: "2024-06-07T15:33:43Z"
labels:
app: mail-migration
name: mail-migration
spec:
containers:
- name: imapsync-with-web
image: docker.io/gilleslamiral/imapsync:latest
# Start the web interface
command:
- /servimapsync
ports:
- containerPort: 8443
hostPort: 4443 This does not happen if you just run If you just exec in and try to run ./imapsync it fails, and this is needed by the web server. May be a bad design pattern but would be nice to have an easy workaround within the YAML, as otherwise I expect I will need to change the entrypoint etc. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to give /tmp execute permissions when running as a pod under systemd?
I've used Kubernetes yaml to build a pod of several containers to run Nextcloud.
One of the Nextcloud apps is failing to run correctly because it relies on having execute permissions in /tmp
My Kubernetes yaml is executed as a non-root user using a systemd service.
Inside the container, I can see that /tmp has been mounted with noexec
I'm new to go and namespaces, but I'm trying to get an understanding of what's going on while trying to solve my issue.
I can see in the docs that there is a systemd option for other podman commands that will mount several tmpfs file systems when systemd mode is enabled. Does the
--service-container
option ensure that that the container will be configured with systemd? I've seen some reference to it here.I can also see that permissions for /tmp are being set here and here but I'm still not sure how /tmp gets configured with the noexec option. Can anyone point me in the right direction? Thanks
Beta Was this translation helpful? Give feedback.
All reactions