Trying to run Komga in Podman and getting `lsetxattr` error

I’ve been playing with setting up various docker images to run in rootless podman. I’m currently working on a web based comic bok reader called Komga.

You can find docker images here:

I’m using a kubernetes yaml file to make the container.

When I run podman play kube xxx.yaml I get the following error:

starting container c386510c7cde6887e554c0d3f6279ea1f1bc4e3c8ff8f9bfa009d6055345684e: lsetxattr /mnt/comics/(New) Battlestar Galactica Six (2014): operation not supported]

Here are the relevant snippets of the yaml:

  28   │     - name: komga
  29   │       image: ghcr.io/gotson/komga
  30   │       env:
  31   │         - name: PUID
  32   │           value: "0"
  33   │         - name: GUID
  34   │           value: "0"
  35   │         - name: UMASK
  36   │           value: "002"
  37   │         - name: TZ
  38   │           value: "America/New_York"
  39   │         - name: JAVA_TOOL_OPTIONS
  40   │           value: "-Xmx4g"
  41   │       ports:
  42   │         - name: komga
  43   │           containerPort: 8080
  44   │           hostPort: 8082
  45   │       volumeMounts:
  46   │         - name: komga-config
  47   │           mountPath: /config:z
  48   │         - name: mylar3-comics
  49   │           mountPath: /books:z
  50   │         - name: timezone
  51   │           mountPath: /etc/timezone:z

And the volume section:

 144   │     - name: mylar3-comics
 145   │       hostPath:
 146   │         path: /mnt/comics
 153   │     - name: komga-config
 154   │       hostPath:
 155   │         path: /home/andy/.podman/komga/config
 156   │     - name: timezone
 157   │       hostPath:
 158   │         path: /home/andy/.podman/komga/timezone
───────┴──────────────────────────────────────────────────────

/mnt/comics is a CIFS mount from my NAS.

I have run the following command to make sure podman containers have SELinux rights to write to SMB mounts:

sudo setsebool -P virt_use_samba 1

Well, I figured it out. When passing a CIFS or NFS share into a container, you should not use the :z option in the mountPath: under volumeMounts:

Welcome to Fedora @apastuszak

Thanks for your clarifications. I set your last answer as Solution :+1:

Thank you