Docker Community Forums

Share and learn in the Docker community.

Permission issues restoring docker volume - Cannot utime: Operation not permitted

I have a docker volume created in a windows system. I have made a backup to a tar file using the command below and all seeing to work. When I inspect the file using 7-zip, I can see that the files have no user assigned and root group assigned to them.

docker run --rm --volume MY_VOLUME:/data --volume %cd%:/backup ubuntu tar cvf /backup/MY_VOLUME.tar /data

I sended this file to other machine that runs a linux based system. When I try to restore my volume with the command below, I’m getting the error message: “Cannot utime: Operation not permitted” .

sudo docker run --rm --volume MY_VOLUME:/data --volume $(pwd):/backup ubuntu  tar xvf /backup/MY_VOLUME.tar -C /data -p --strip 1 

I’m almost sure this problem is related to permission issues in the process of untar the volume. I already try to restore the volume using user and group tags (root) in docker command and in the untar command, but no sucess.

So, my question is, how can I restore my volume without this permission issues?

I’m so confused how docker manage the permissions in volumes. I’ll appreciate if the answer came with some explanation about this too.