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

chown: changing ownership of '/var/cache/squid': Operation not permitted #84

Open
riesbl01 opened this issue Apr 28, 2022 · 1 comment

Comments

@riesbl01
Copy link

riesbl01 commented Apr 28, 2022

Hey everyone, I am getting this error: chown: changing ownership of '/var/cache/squid': Operation not permitted when running helm chart in my AKS. I have another team that changed their init container create-cache-dir args to:

      args:
            - |
              set -e
              squid -z 2>&1

vs what is currently being set:

        args:
            - |
              set -e
              chown -R squid.squid /var/cache/squid
              chmod 770 /var/cache/squid
              squid -z --foreground 2>&1
``

Would it be possible to either update this helm chart to have these args, provide a solution for why my stuff is failing, or allow the args to be a templated input where I can pass my own args?

@riesbl01
Copy link
Author

Update: According to https://stackoverflow.com/questions/58747923/write-permissions-on-volume-mount-with-openshift we need to add a security context section under the init container in the deployment yaml, like:

      initContainers:
        - name: create-cache-dir
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          securityContext:
              fsGroup: GROUP_ID

Not sure what GROUP_ID would be so, maybe some suggestions from this team on that?
https://kubernetes.io/blog/2016/08/security-best-practices-kubernetes-deployment/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant