Skip to content

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

Open
@knutejohKLP

Description

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions