Javadroider
Javadroider

Reputation: 2450

Invalid user/usergroupd while extracting tar file

I am trying to extract .gz file using following command.

tar -xvf tezt.tar.gz

Extraction is successful,But userid assigned is 1003 & usergroup assigned in 200. What are these values? from where I got these?

[root@machine user1]# ls -l
  total 59236
  -rw------- 1 root root 60237626 Aug 27 16:47 test.tar.gz
  drwxr-xr-x 2 1003 200 4096 Feb 27 2014 folder1
  drwxr-xr-x 2 1003 200 4096 Feb 27 2014 folder2

Upvotes: 2

Views: 181

Answers (1)

falsetru
falsetru

Reputation: 368944

If you're a superuser (or if you specified --same-owner option), it will preserve the same ownership in the archive file.

 --same-owner
       try extracting files with the same ownership as exists in the ar‐
       chive (default for superuser)

If you don't want that, use --no-same-owner option:

 --no-same-owner
       extract files as yourself (default for ordinary users)

Upvotes: 1

Related Questions