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: /var/spool/postfix/: Operation not permitted when using persistent volume claims #97

Closed
erc7 opened this issue Jan 13, 2022 · 3 comments

Comments

@erc7
Copy link

erc7 commented Jan 13, 2022

Deploying via helm.

Config:

persistence:
  enabled: true
  accessModes:
    - ReadWriteOnce
  size: 128Mi
  storageClass: efs-sc

Storageclass:

Name:                  efs-sc
IsDefaultClass:        Yes
Annotations:           meta.helm.sh/release-name=aws-efs-csi-driver,meta.helm.sh/release-namespace=kube-system,storageclass.kubernetes.io/is-default-class=true
Provisioner:           efs.csi.aws.com
Parameters:            basePath=/dynamic_provisioning,directoryPerms=700,fileSystemId=*******,gidRangeEnd=2000,gidRangeStart=1000,provisioningMode=efs-ap
AllowVolumeExpansion:  <unset>
MountOptions:
  tls
ReclaimPolicy:      Delete
VolumeBindingMode:  Immediate
Events:             <none>

Log:

★★★★★ POSTFIX STARTING UP ★★★★★                    
‣ INFO  Not setting any timezone for the container 
‣ INFO  Using plain log format for rsyslog.        
‣ NOTE  Using smart filter for email anonymization.
chown: /var/spool/postfix/: Operation not permitted

The persistent volume claim seems to be bound properly when creating the deployment. Am I missing something?

@erc7
Copy link
Author

erc7 commented Jan 13, 2022

related: kubernetes-sigs/aws-efs-csi-driver#300

is it possible to have a toggle similar to the one stated in above:

initChownData:
  enabled: false

@bokysan
Copy link
Owner

bokysan commented Jan 13, 2022

Yes, of course. I can start working on next month.

Pull requests are welcome, though.

@dominik-bln
Copy link

FYI, this can be fixed via the existing extraInitContainers field currently:

extraInitContainers: |
    - name: volume-mount-hack
      image: busybox:1.35.0-glibc
      command: ["sh", "-c", "chown -R 100:102 /var/spool/postfix/private && chown -R 100:102 /var/spool/postfix/public "]
      volumeMounts:
      - mountPath: /var/spool/postfix/private
        name: private
      - mountPath: /var/spool/postfix/public
        name: public

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

3 participants