On Tue 30. of October 2007 12:27:11 Alexey Stratonnikov wrote: > When cpio archive is created as "find . -depth |cpio -o" and extracted as > "cpio -i --make-directories" under root user, I get all directories owned > by UID=0 no matter who was the owner of the directory when acrive was > created. > > This may be shown as: > > $ su - > tux ~ # id -u > 0 > tux ~ # mkdir test; cd test > tux test # mkdir in out; mkdir in/dir; touch in/dir/file > tux test # chown 1 in/dir > tux test # (cd in; find . -depth |cpio -o) | (cd out; cpio -i > --make-directories) > 1 block > 1 block > tux test # ls -ln in > total 0 > drwxr-xr-x 2 1 0 72 Окт 22 08:56 dir > tux test # ls -ln out > total 0 > drwxr-xr-x 2 0 0 72 Окт 22 08:56 dir > tux test # cpio --version > cpio (GNU cpio) 2.9 > tux test # > > One can see different owner UID for in/dir and out/dir. > > Notice: when cpio -i works, the directory is first created, then populated > with files, then set correct pwermissions and owner UID, and finally (when > the whole archive is extracted), owner UID is reset back to 0. > > The problem was not observed with cpio 2.6. > The problem does not emerge with "find |cpio -o" (without -depth). > > -- > Hope this information was useful, > Alexey Stratonnikov
I can confirm this regression in cpio 2.9. It's quite bad, because the documentation suggests to use the 'find . -depth' as safest invocation of find for cpio. The bug does not occur in cpio 2.8. I think the problem might be in delayed set_stat, but I did not found it yet... -- Radek Brich Base OS/core services Red Hat, Brno, Czech Rep.
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Bug-cpio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-cpio
