On Sunday 17 February 2008 19:38, Aizer Danny-BDA023 wrote:
> Hi,
>  
> It seems that busybox's tar applet doesn't support the -p option which
> is standard for (e.g.) GNU tar.

What do you mean by "doesn't support"? It errors out on it?
It accepts it but doesn't honor?

Since you didn't send this info, I tried to check myself.

sh-3.2# /usr/bin/tar --version
tar (GNU tar) 1.15.1

sh-3.2# ./tar --help
BusyBox v1.10.0.svn (2008-02-17 00:31:14 CET) multi-call binary
...

Both seem to create files with exact mode from tarfile,
_even without -p option_:

sh-3.2# umask 077
sh-3.2# ./tar xjf *.tar.bz2
sh-3.2# ls -l
drwxr-xr-x   30 root     root         1152 Feb 18 00:46 busybox-1.9.1
^^^^^^^^^^
-rw-r--r--    1 root     root      1795971 Feb 12 17:14 busybox-1.9.1.tar.bz2
-rwxr-xr-x    1 root     root       783672 Feb 18 00:44 tar
sh-3.2# rm -rf busybox-1.9.1
sh-3.2# /usr/bin/tar xjf *.tar.bz2
sh-3.2# ls -l
drwxr-xr-x   30 root     root         1152 Feb 12 17:14 busybox-1.9.1
^^^^^^^^^^
-rw-r--r--    1 root     root      1795971 Feb 12 17:14 busybox-1.9.1.tar.bz2
-rwxr-xr-x    1 root     root       783672 Feb 18 00:44 tar

(I also looked inside those dirs: files have -rw-r--r-- mode too,
so umask 077 is not affecting files either).

> Is there a way to achieve the same
> functionality using the busybox tar, or can this option be supported by
> busybox tar? Otherwise it seems that tar extracts files and creates them
> using the current user's umask, which sometimes means that files have
> the wrong permissions after extraction.

Testcase?
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to