How to get around this error when unTarring an archive “tar: Cannot change ownership to uid 1000, gid 1000: Operation not permitted”
13,901
The problem is described here. This problem arises when trying to untar in a context where tar thinks it is root (e.g. a Docker container). The solution is to add the flag --no-same-owner
:
tar -zvxf training.tar.gz -C data/multi30k --no-same-owner
Related videos on Youtube
![Jacob Stern](https://lh4.googleusercontent.com/-xIkyNI00Nh8/AAAAAAAAAAI/AAAAAAAAAfo/w0wPUt0Yb_c/photo.jpg?sz=256)
Author by
Jacob Stern
Updated on September 18, 2022Comments
-
Jacob Stern almost 2 years
When attempting to untar a file in a docker container with:
tar -zvxf training.tar.gz -C data/multi30k
I received the following error (
train.de
is a file within the .tar file):tar: train.de Cannot change ownership to uid 1000, gid 1000: Operation not permitted
But the file untar's just fine locally. What could be causing this error?