I'm using tar 1.15.1 (CentOS 5.5) to archive a directory.

[www]$ tar -tvzf public_org.tgz 'public/files'
drwxrwxr-x root/www          0 2010-12-01 07:33:33 public/files/
-rwxrwxr-x root/www         55 2010-12-01 07:33:33 public/files/dummy.txt
[www]$ ls -ld public/files{,/*}
drwxrwxr-x 2 apache apache 4096 Dec  1 07:33 public/files
-rwxrwxr-x 1 apache apache   55 Dec  1 07:33 public/files/dummy.txt
[www]$ tar -dvzf public_org.tgz 'public/files'
public/files/dummy.txt: Uid differs
public/files/dummy.txt: Gid differs

Anybody know why I don't get Uid/Gid differs messages on the directory? I'd really like to know if any permissions changed.

I tried running as both normal user and root.


Interesting question. I saw the same behavior with tar-1.15-1 on Centos 5.5. I took a look at the source, and it apparently doesn't diff directories, as you observed.

I compiled up the most recent version (1.26) and tried that. Same behavior.

I'm not sure what, if any rationale there is behind this. There could be a good one, I suppose, or maybe it's just something that they haven't implemented yet. You might try asking on the tar help mailing list

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.