According to the unzip man page, the -X
option should, "restore [...] user and group info (UID/GID) under Unix"
I made a test zip file as follows (using Info-ZIP Zip 3.0) as root:
# touch testfile
# chown ruario:users testfile
# zip -m testfile.zip testfile
adding: testfile (stored 0%)
Then restored it with UnZip (6.00) as follows:
# unzip -X testfile.zip
I then checked the file ownership for the restored file, expecting it to be owned by ruario:users
# ls -l testfile
-rw-r--r-- 1 root root 0 Sep 11 21:28 testfile
Nonetheless, looking at the zip file info I can see Zip has stored an entry for Unix UID/GID:
# unzip -Z -v testfile.zip | grep -A1 0x7875
- A subfield with ID 0x7875 (Unix UID/GID (any size)) and 11 data bytes:
01 04 e8 03 00 00 04 64 00 00 00.
So any thoughts on why this fails for me? Does it work for anyone else?
P.S. Distro is Slackware64 14.0. I have recompiled infozip package (to add bzip2 compression).