Zip bad address I/O error on Ubuntu 24.04.2

I am using webdav server pro from the Olive tree to connect my galaxy s8 to Ubuntu 24.04.2 as a webdav connection. I want to backup a particular folder as a zip file using this command:

ubuntuvm@ubuntuvm-VMware-Virtual-Platform:/run/user/1000/gvfs/dav:host=192.168.1.103,port=8080,ssl=false$ find "sdcard/Download" -maxdepth 0 -exec zip -r -0 -v "/home/ubuntuvm/Documents/test.zip" "{}" \;

command but it stops randomly producing

zip I/O error: Bad address
zip error: Output file write failure (write error on zip file)

I contacted the maintainers of info-zip and they said that info-zip is largely unchanged from 2008-2009 therefore the culprit could be webdav built into ubuntu. Can anyone help me shed some light on what changes webdav has gone through or why it’s failing?

It seems you are facing this problem since at least 2023. A user on askubuntu (maybe that’s you too?) concluded it’s an issue with Samsung Galaxy S8.

Maybe (security) bugs in webdav implementation have been closed and interfere with file transfer on this old device. Maybe an Update to Android on the phone broke something. Maybe the phone is locking internal storage after a while and blocking access 


Does the same procedure work with other phones based on Android?

1 Like

yes that was posted by me lol

I will try with a pixel 9 pro as well as another samsung phone

I dont think that android is the culprit since in that askubuntu forum post, ubuntu 20.04 webdav worked but not newer versions. I showed that any ubuntu distro including mint and zorin after 20.04 did not work so the configuration files or anything related to webdav implementation has changed. Im trying to piece together what has changed.

[edit] Okay so I tested with a samsung galaxy A70, and I got the same issues

As you can see, even with another android phone, the same type of errors are produced.

1 Like

What exit code do you get from zip ? You can find out by running ‘echo $?’ after zip fails. The meanings of the codes are listed in the manual page for zip in the section ‘DIAGNOSTICS’ towards the end of the page. I’m asking because the error message looks more like it has problems writing the archive than with reading from webdav.

Also, I’d drop the ‘find’. ‘find “directory” -maxdepth 0’ always returns only the given directory, so it’s not useful. Just do 'zip -r -0 -v “~/Documents/test.zip” “/run/user/1000/gvfs/dav:host=192.168.1.103,port=8080,ssl=false/sdcard/Download”

if you mean like this, the the exit code is 0

In terms of the find command, I use it like that so I can combine it with zip -r because find by default does recursive search unless I use -maxdepth 0

using without find command and only zip command

zip -r -0 -v "/home/ubuntuvm/Documents/test.zip" sdcard

So does ‘zip -r’, so even if you don’t use the maxdepth option ‘find’ is completely useless here.

And it hides the error from zip, find returns an exit code of ‘0’ - which always means success (and it’s right, ‘find’ did what it’s supposed to do 
). If you ran the zip directly instead of calling it from zip you’d get some other code which might give us some insight into what’s going on.

So I got error code 14. I didn’t do the entire sdcard folder (even though I don’t have an sdcard inserted into the galaxy A70) because it would take forever, so I just tried to zip the sdcard/DCIM folder since this is the most important folder to backup

From ‘man zip’:

14 error writing to a file

So unless it’s writing some temporary file to the directory where the source files are this should not have anything to do with webdav.

You could try again with the -b or --temp-path option to zip to explicitly tell it where to put temporary files, e.g. ‘zip -r -0 -v --temp-path /tmp/ “~/Documents/test.zip” “/run/user/1000/gvfs/dav:host=192.168.1.103,port=8080,ssl=false/sdcard/Download”’

Alternatively you could try some other program instead of zip, e.g. tar or - if you need zip-files - 7z with the option ‘-tzip’ (this makes 7z create zip files instead of 7z files).

zip creates a random character temporary file in the same folder as the zip archive is being created. I’m assuming either zip or webdav has problems saving or closing the temporary file

I’ve tried the --temp-path /tmp/ option for zip and I got the same error.

With 7z, this is what I’m getting:

I am seeing a temp file being created in the same folder with the archive with 7z

7z also reported the same error

it seems to me that the likely culprit is gvfs or webdav itself

On the one hand both programs produce write errors - which should not have anything to do with gvfs and / or webdav, but on the other hand I can’t think of anything else both have in common, assuming it’s not some kind of problem with the file system your $HOME is on (when was the last time you did an fsck on that ?).

Does it work If you just copy everything first and zip it up locally ?

The file system is perfectly fine, the VM’s are installed on a internal ssd with no OS installed on it, so it’s just used as a storage. Also, I re-did the test on ubuntu 20.04, both zip and 7zip completed sucsessfully somehow, but not in the new ubuntu 24.04. THAT is very strange to me. This is why I suggested that there is something broken with gvfs or webdav. For additional information, I just did a random sudo apt install gvfs in both versions, and I found that gvfs is version 1.44 in ubuntu 20.04 and 1.54 in ubuntu 24.04. Does this shed any clue ?

I have both ubuntu 24.04 and Ubuntu 20.04 virtual machines in vmware for comparison.

How can I do a fsck ?

There are no issues with copy and pasting from WebDAV mounted folder into local directory then zipping it. Errors mainly occur from the gvfs it seems or when closing the temporary zip file

You can view the version differences in many ways, one example is from the changelog for the 24.04 version you specify, ie.

https://changelogs.ubuntu.com/changelogs/pool/main/g/gvfs/gvfs_1.54.0-1ubuntu2/changelog

The changes that occurred between the older version & newer version will be listed there (in summary format anyway). There will be a lot of changes, as 20.04 to 24.04 is a total of 8 Ubuntu releases.

I’m not really understanding the high level of programming wording but it seems like alot has changed behind the scenes

Is there a package maintainer or someone that develops WebDAV for Ubuntu releases???

Did you already

?


Didn’t you say this happens with all your tested linux not only Ubuntu? And I doubt it’s something in gvfs / webdav implementation.
I guess there is something happening with the input stream to zip which zip doesn’t recognise as such and instead reports an output error.


Just found another one of your postings (fedora) on this issue. You obviously nailed it already to be an issue with your Samsung Galaxy S8 but just don’t accept it. Why?
Did you try reporting this to Samsung? What did they say?

1 Like

that’s correct and the same issue persists same like another samsung phone.

I guess I should rephrase, it happens with ubuntu and ubuntu based distro’s as well (or more broadly debian)

so what do you think it may be ? nothing else comes to my mind, something has to cause this


I’ve contacted someone from Info-zip using their mailing address and we’ve narrowed down the possibilities to either webdav or gvfs itself, I’ve even given over 80 messages of email chain with screenshots proving the same copy operations don’t work after ubuntu 20.04, whereas in ubuntu 20.04 it all worked, even with 7zip and the normal zip, so the conclusion seems pretty clear to me.

Actually the issue wasnt the galaxy s8 afterall, if you read alot further down, the issue is still unresolved and a few more posts up concludes that the problem is with ubuntu versions greater than 20.04.

Samsung wasn’t the issue, the issue was something with zip, gfvs or webdav mount in linux

In the end, the process to find what exactly has changed and how to fix or identify the problem continues

No. The fact that it is working with other phones (there is nothing to read that excludes an issue with Galaxy S8) points to Samsung’s Android implementation and / or the server implementation of webdav on Android.
You even proved that it’s likely an issue with olive tree’s webdav server implementation in Android yourself (!), maybe in conjunction with Samsung’s Android implementation. You tested with another webdav server on your phone and it worked 


There is nothing to say anymore.

1 Like

I said its working with phones under ubuntu 20.04, not ubuntu 24.04. Fv file manage doesn’t work actually, I verified it just now. FV file manager mounted as webav in ubuntu displays incorrect file/folder size along with timestamps from what’s shown on the android device itself.

That fedora post is too old now to change.

Again: to me this looks like Samsung’s Android implementation on your Galaxy S8 doesn’t work properly with any Android webdav server.

1 Like

I doubt it because when I tried webdav server pro, it shows all the file and folder information correctly so it’s not the s8 or the app, but I do think it’s something in linux that’s not properly configured or overlooked

Question: if the workaround suggested by @hdd-gehrke to copy locally and then zip works without errors, why not just stick with that for now?

I mean, perhaps it is not ideal, but at least you have a way to copy and zip.

Sorry, I don’t have a better suggestion for you right now.

3 Likes