Reputation: 445
I understand that podman unshare
can be used to properly set the permissions on unprivileged containers.
So podman unshare chown 1234:1234 -R /home/user/volume
can be used to set the volume to the properly mapped ids.
But I'm getting permission errors when I'm trying to do that:
podman unshare chown -R 1234:1234 -R /home/user/foo/bar; echo $?
chown: changing ownership of '/home/user/foo/bar': Operation not permitted
1
The first thing I thought about was directory permissions but it fails even if I'm giving the destination directory 0777
.
I'm calling the command as user user
and the parent directories have these permissions:
drwxr-xr-x root /home
drwxr-x--- user /home/user
drwxrwxrwx user /home/user/foo
drwxrwxrwx user /home/user/foo/bar
It isn't my intention to really use 0777
in production but something is off even with 0777
and it's not clear to me how to debug this.
Upvotes: 1
Views: 382