That is the expected behavior. Again, because Rootless Docker. Your user on the host becomes root in the container and other users in the container will have a shifted user id and group id. That is required because otherwise a user inside the container could edit files that were not meant to be accessed by processes in the container. You can check the content of /etc/subuid to see the first user id that would be used in the container for UID 1 and it also contains how mny user ids you can have in your user namespace, because that is what it is. So based on the subuid settings you could calculate the right ID, but you can just make a folder writable by everyone, start a container and create a file with user inside the container on a mounted folder from the host. Then go back to the host and check the owner id. All files have to be owned by that ID even if there is no user on the host (which is most likely the case) so the user in the container can read and write them.