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

Backup image not usable on Openshift due to restrictions on /home/user directory #1091

Open
knutejohKLP opened this issue Jan 27, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@knutejohKLP
Copy link

Describe the bug
When trying to use the backup-image on Openshift it fails due to restrictions on the /home/user directory. In openshift we run the pod with an arbitrary user-id, and not user 1000, causing access denied to logged from the jenkins-operator pod.

Currently the access is set to:
drwx------. 1 user user 17 Jun 25 2024 user

To Reproduce
Run the backup container locally with an arbitrary user-id, and try to run /home/user/bin/get-latest.sh

docker run -u 10231321 -it quay.io/jenkins-kubernetes-operator/backup-pvc:v0.4.1 /bin/bash
I have no name!@6398951d01cd:/home/user/bin$ /home/user/bin/get-latest.sh
bash: /home/user/bin/get-latest.sh: Permission denied
I have no name!@6398951d01cd:/home/user/bin$

Additional information
To fix, add chmod a+xr /home/user or similar to the Dockerfile here https://github.com/jenkinsci/kubernetes-operator/blob/master/backup/pvc/Dockerfile#L28

Kubernetes version:
Jenkins Operator version: 0.8.1

Add error logs about the problem here (operator logs and Kubernetes events).

@knutejohKLP knutejohKLP added the bug Something isn't working label Jan 27, 2025
@brokenpip3
Copy link
Collaborator

yep indeed it's valid issue, thanks to report it. Should be an easy fix

@brokenpip3
Copy link
Collaborator

btw we have a dedicated issue for openshift fyi: #826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants