ikke-t / podman-container-systemd

creates systemd files and creates containers using podman
118 stars 44 forks source link

Folder creation for volumes (containers) #55

Closed c-erb closed 2 years ago

c-erb commented 2 years ago

Added folder creation for volumes (containers, not pods) - Pods can use DirectoryOrCreate

First it checks if the folder already exists and if it does, it won't adjust any permissions. This helps if podman can't manage the permissions correctly.

It allows for changing the owner and group in case it is needed to set a specific UID and GID.

It also allows to change the mode.

I added explanations for :U as well, which tells podman to change the permissions to the container user recursively. This works if the service inside the container doesn't run with a different user than the container.

ikke-t commented 2 years ago

Thanks, what a nice addition. Neat trick with the filter finding the volume paths :)

c-erb commented 2 years ago

Thanks, what a nice addition. Neat trick with the filter finding the volume paths :)

:) Thank you. Glad I can provide something useful.