There are a few ways around it. The simplest is to add the --privileged option.
The more secure method with podman is by specifying a user (ex -u 10001:10001) from your extended subuid:subgid range after your full and proper setup of rootless podman :-)
Then instead of chown you'll want to use the oddly named podman unshare tool to automatically set the permissions of the host directory. You would then want to start your service with systemctl --user instead of sudo systemctl
This denotes the range of subuids that are available to your user.
-u 100000:65536
This part specifies two things ([UID]:[GID]) even though it's the same syntax as the earlier part that specifies one range :)
I suspect what you will want to do is use the following:
# change ownership of the directory to the UID:GID that matches something in your subuid:subgid range, in this case 10000:10000
podman unshare chown -R 100000:10000 /home/privatenoob/media/storage1/Filmek/
Then we can specify that the user in the container can match the user (UID) we specified above:
As a note, if you copy/pasted that ExecStart line, you might have gotten the invalid argument error because you entered 100000 (outside of your subuid range, i.e. >65536) instead of 10000.
There's a nice guide that gives a great walkthrough. I'll dig through my bookmarks and add it here when I get some time.
I'm doing rootless most likely, I just use the default Rocky Linux 9 setup with the Container Tools option turned on while the setup process. This didn't work either for me. Did you start the service in sudo systemctl or in systemctl --user mode? Thanks for your help!
Hey, sorry for the late reply. I am running rootless using a dedicated user, so I use systemctl --user to control the container.
From what I understand, when running rootless the root user inside the container correlates to the outside user (which is running the container), in terms of permissions. The external directories I bind mount into the container as externally owned by my dedicated user, so that the root user inside the container owns them (inside the container).
Drop the / in "/data" for the chown command. Now it is looking for a data folder in root, and not the one in "Filmek".
Don't know if it will help with your issue thou
startpage.com
Hot