Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cpio портит owner uid - это баг или нет?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
user11
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2005
Posts: 149

PostPosted: Mon Oct 22, 2007 5:11 am    Post subject: cpio портит owner uid - это баг или нет? Reply with quote

Code:
$ 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 #


Получается out/dir с владельцем uid 0. Ожидалось uid 1.

Характерно, что при распаковке он сначала создаёт каталог, затем кладёт в него файлы, потом проставляет ему правильные permissions & uid/gid, а ещё позже, уже после того, как распакует весь архив, снова проставляет всем папочкам uid/gig=root/root. Характерно, что если убрать у find опцию -depth, то это не происходит. Кроме того, это не наблюдалось в cpio 2.6.

Поскольку с cpio общаюсь мало, возникает вопрос - это баг или норма? man/info, вроде, почитал, и, кажется, что это баг. Но полной ясности нет.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum