Why using find and zip gives zip I/O error?
1 Attachment(s)
Hello, I am using a webdav server pro from the olive tree to mount my galaxy s8's internal storage. When I try to zip a folder using this command
Code:
find ."/sdcard/DCIM/Camera" -exec zip -0 -r "/home/ubuntu/Documents/test.zip" {} + zip I/O error: Bad address zip error: Output file write failure (write error on zip file) please see the attachment Why? |
I guess it is a disk full or something similar. Or probably a permission issue.
|
This could be caused by insufficient space on /tmp, try issuing 'export TMPDIR=<directory with lots of space>' before running this command or use tar since you are storing anyway.
|
how do I change permission or change the storage space of /tmp ? is this done in terminal ?
|
Quote:
Code:
zip -r /home/ubuntu/Documents/test.zip /sdcard/DCIM/Camera/* |
Quote:
I can copy files to and from the android device when its mounted as a network webdav share because i already tested it with a small sample file. How can i change the permissions and for which file or folder specifically ? os it a global permissions issue on a vm ? |
1 Attachment(s)
Quote:
Code:
df -h /tmp |
you ought to run that df when the error occurred, which is impossible. You might try strace -o /tmp/strace.out -f zip .....
and check /tmp/strace.out to see what call caused that i/o error. |
2 Attachment(s)
Quote:
13477 execve("/usr/bin/zip", ["zip"], 0x7fff7709c8a8 /* 47 vars */) = 0 13477 brk(NULL) = 0x557535810000 13477 arch_prctl(0x3001 /* ARCH_??? */, 0x7fff4e0e0a20) = -1 EINVAL (Invalid argument) 13477 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd966b3c000 13477 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) 13477 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 13477 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=61257, ...}, AT_EMPTY_PATH) = 0 13477 mmap(NULL, 61257, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd966af2000 13477 close(3) = 0 13477 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libbz2.so.1.0", O_RDONLY|O_CLOEXEC) = 3 13477 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832 13477 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=74848, ...}, AT_EMPTY_PATH) = 0 13477 mmap(NULL, 76840, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd966ada000 13477 mmap(0x7fd966adc000, 53248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fd966adc000 13477 mmap(0x7fd966ae9000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7fd966ae9000 13477 mmap(0x7fd966aeb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7fd966aeb000 13477 close(3) = 0 13477 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 13477 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P<\2\0\0\0\0\0"..., 832) = 832 13477 pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 13477 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2072888, ...}, AT_EMPTY_PATH) = 0 13477 pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784 13477 mmap(NULL, 2117488, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fd966800000 13477 mmap(0x7fd966822000, 1540096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7fd966822000 13477 mmap(0x7fd96699a000, 360448, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19a000) = 0x7fd96699a000 13477 mmap(0x7fd9669f2000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f1000) = 0x7fd9669f2000 13477 mmap(0x7fd9669f8000, 53104, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fd9669f8000 13477 close(3) = 0 13477 mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd966b39000 13477 arch_prctl(ARCH_SET_FS, 0x7fd966b39740) = 0 13477 set_tid_address(0x7fd966b39a10) = 13477 13477 set_robust_list(0x7fd966b39a20, 24) = 0 13477 rseq(0x7fd966b3a060, 0x20, 0, 0x53053053) = 0 13477 mprotect(0x7fd9669f2000, 16384, PROT_READ) = 0 13477 mprotect(0x7fd966aeb000, 4096, PROT_READ) = 0 13477 mprotect(0x5575355f3000, 12288, PROT_READ) = 0 13477 mprotect(0x7fd966b35000, 8192, PROT_READ) = 0 13477 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 13477 munmap(0x7fd966af2000, 61257) = 0 13477 getrandom("\x4f\xb1\x64\x17\x11\xda\x17\x08", 8, GRND_NONBLOCK) = 8 13477 brk(NULL) = 0x557535810000 13477 brk(0x557535831000) = 0x557535831000 13477 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 13477 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=14588416, ...}, AT_EMPTY_PATH) = 0 13477 mmap(NULL, 14588416, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd965a00000 13477 close(3) = 0 13477 openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 3 13477 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3494, ...}, AT_EMPTY_PATH) = 0 13477 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3494, ...}, AT_EMPTY_PATH) = 0 13477 read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"..., 4096) = 3494 13477 lseek(3, -2225, SEEK_CUR) = 1269 13477 read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0\0\0\0"..., 4096) = 2225 13477 close(3) = 0 13477 ioctl(1, TCGETS, {c_iflag=ICRNL|IXON|IUTF8, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B38400|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0 13477 newfstatat(1, "", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}, AT_EMPTY_PATH) = 0 13477 write(1, "Copyright (c) 1990-2008 Info-ZIP"..., 73) = 73 13477 write(1, "Zip 3.0 (July 5th 2008). Usage:\n", 32) = 32 13477 write(1, "zip [-options] [-b path] [-t mmd"..., 79) = 79 13477 write(1, " The default action is to add o"..., 75) = 75 13477 write(1, " can include the special name -"..., 61) = 61 13477 write(1, " If zipfile and list are omitte"..., 67) = 67 13477 write(1, " -f freshen: only changed fil"..., 75) = 75 13477 write(1, " -d delete entries in zipfile"..., 77) = 77 13477 write(1, " -r recurse into directories "..., 77) = 77 13477 write(1, " -0 store only "..., 79) = 79 13477 write(1, " -1 compress faster "..., 57) = 57 13477 write(1, " -q quiet operation "..., 78) = 78 13477 write(1, " -c add one-line comments "..., 61) = 61 13477 write(1, " -@ read names from stdin "..., 77) = 77 13477 write(1, " -x exclude the following nam"..., 74) = 74 13477 write(1, " -F fix zipfile (-FF try hard"..., 70) = 70 13477 write(1, " -A adjust self-extracting ex"..., 72) = 72 13477 write(1, " -T test zipfile integrity "..., 71) = 71 13477 write(1, " -y store symbolic links as t"..., 71) = 71 13477 write(1, " -e encrypt "..., 71) = 71 13477 write(1, " -h2 show more help\n", 22) = 22 13477 write(1, " \n", 3) = 3 13477 exit_group(0) = ? 13477 +++ exited with 0 +++ please see the attachment. Even when using -type d switch, find still tried zipping a file instead of just the folder. Something seems broken. I've also added myself to the vboxsf users group. I'm not sure what the 992 means. Is there a higher level of permissions than 992 ? df -h /tmp gives me: Filesystem Size Used Avail Use% Mounted on /dev/sda2 99G 34G 61G 36% / since I've increased virtualbox total hdd space from 50 GB to 100 GB |
I can't find any error in that strace log.
|
Quote:
|
No, I can't reproduce it. But you need to execute the full command, like this:
Code:
strace -o /tmp/strace.out -f zip -r /home/ubuntu/Documents/test.zip /sdcard/DCIM/Camera/* |
Quote:
|
To be able to reproduce it I need to recreate your environment, and 1. I don't know it, 2. I have no virtualbox.
But anyway, it is quite obvious something is incorrect in your setup and I have no any chance to [re]produce the same situation without knowing it. |
Quote:
WebDAV server available on: http://10.0.0.132:8080 Home directory: / Password disabled on ubuntu I connected the android phone with dav://10.0.0.132:8080 and opened the root folder with "open in terminal" Another possibility is if you'd like to set up a microsoft teams meeting with me and see it that way which is alot faster. Btw, which working directory am I supposed to be in to execute this command strace -o /tmp/strace.out -f zip -r -0 /home/azeem/Documents/example.zip /sdcard/DCIM/Camera/* Maybe this will help: Code:
"b\224\202)\216\304z\34\240/\261\323\244ye\17\31\201\277]\221\206\244U\19k>Y\332\271\316"..., 16384) = 16384 |
All times are GMT -5. The time now is 12:23 AM. |