question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error deploying in OpenShift because of chown

See original GitHub issue

What happened?

Hi, I’m trying to setup a POC of Reposilite for my organization, it runs perfectly via podman on my development machine, but when I try to deploy it in an openshift cluster the pod crashes right after the start. Below you will find the log entries before the crash, and here’s my deployment yaml:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dep-reposilite
spec:
  replicas: 1
  selector:
    matchLabels:
      deployment: reposilite
  template:
    metadata:
      labels:
        deployment: reposilite
    spec:      
      containers:      
      - name: reposilite
        image: dzikoysk/reposilite:3.2.0       
        ports:
        - containerPort: 8080
          name: tcp-8080
          protocol: TCP
        resources:
          limits:
            cpu: 500m
            memory: 256M  

Does the container need root priviliges to run? In this case this would break one of my company’s security policy.

Thanks for the support!

Reposilite version

3.x

Relevant log output

chown: changing ownership of '/app/data/lost+found': Operation not permitted
chown: changing ownership of '/app/data': Operation not permitted
chown: changing ownership of '/app/entrypoint.sh': Operation not permitted
chown: changing ownership of '/app/reposilite.jar': Operation not permitted
chown: changing ownership of '/app': Operation not permitted
chown: changing ownership of '/var/log/reposilite': Operation not permitted
runuser: may not be used by non-root users

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bennyevangelistacommented, Dec 15, 2022

I’ve done it 😃 !

I’ve built a new image, starting from official reposilite:3.2.0 and fixing folder permissions. Here’s my Dockerfile (it’t the alpha version, next I’m gonna add a full entrypoint.sh supporting the optional parameters as in the original version).

FROM docker.io/dzikoysk/reposilite:3.2.0

WORKDIR /app

RUN chgrp -R 0 /app && \
    chmod -R g=u /app
	
ENTRYPOINT ["java", "-jar", "reposilite.jar"]

Now Openshift deploy works and reposilite it’s up and running.

0reactions
dzikoyskcommented, Dec 15, 2022

Let me know if you’ll find something related to this issue 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

chown operation not permitted · Issue #17164 · openshift/origin
Hi, I am trying to deploy oficial mongodb image from docker hub ... an error like "chown: changing ownership of '/data/db': Operation not ......
Read more >
Chown operation is not permitted on my pod at openshift
But when the pod is deployed on openshift it shows the error of. chown operation is not permitted. Can someone help me with...
Read more >
Getting an error about chown when starting JBoss as linux ...
When starting JBoss EAP in domain mode as a service it's complaining about the chown command. It also say [ OK ], but...
Read more >
Resolving Linux permission issues within OpenShift persistent ...
After running a Pod with the anyuid SCC, there are Linux (Discressionary Access Control) permission issues stopping Pods from starting correctly ...
Read more >
Updating the filesystem package fails with error "unpacking of ...
Issue. While updating or upgrade of filesystem package, the error message "unpacking of archive failed on file /mnt: cpio: chown failed - Read ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found