ifuse
ifuse copied to clipboard
Input/Output error when mounting documents apps
Hi, I'm trying to mount the document folder of an app with Itunes File Sharing support (OnlyOffice Document here but any app I tried has the issue). Mounting works fine but any access to the mounted folder exhibits an I/O error (the first time after a few seconds long timeout).
This is with the Debian sid version (I'm the maintainer), which is based on a 2018 snapshot (1.1.4~git20181007.3b00243-1
) with libimobiledevice 1.2.1~git20191129.9f79242-1
and libusbmuxd 2.0.1.
I wanted to try with more recent libraries but as I understand the projects are in the middle of a large refactoring so I'll wait a bit before trying the various stuff (do you intend to make tags and tarball releases, by the way?) but wanted to document it a bit.
If you need any log please ask. I've tried to pass --debug to ifuse but it didn't show anything more (maybe it needs to be built with debugging enabled as well?).
I tested ifuse, it definitely works. Maybe you try again with the new releases which we are putting together as we speak.
That's good to know. I'll try them once things have settled down a bit (and hopefully there will be tags?)
Tags and the whole thing
So, I tried with:
- ifuse
cce061d
- libimobiledevice
bc32998
- libusbmuxd
9860981
and I still have I/O errors with ifuse when using --documents. Any pointer on how to debug this further would be helpful.
I noticed that actually it's the mount
operation that fails but it's never propagated:
mount("ifuse", "/tmp/fuse", "fuse.ifuse", MS_NOSUID|MS_NODEV, "fd=5,rootmode=40000,user_id=1000"...) = -1 EPERM (Operation not permitted)
The ifuse return code is 0 and somehow the mount appear in the list:
ifuse on /tmp/fuse type fuse.ifuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
I'll keep investigating.
Other fuse filesystems mounts work fine as user. ifuse
works fine when run as root. This behaviour has changed recently (not sure when) but it might be related to some specific underlying changes in the distribution and/or the kernel so I'll keep looking
But there's definitely something fishy here because:
- other type of fuse mounting (gvfs, sshfs etc.) work fine as non-root
- ifuse without --document works fine as non-root.
Still investigating
So I discovered you can pass -f
on the command line to keep ifuse
in the foreground and have some debug output.
When mounting in /tmp/fuse/
it seems to work (for --documents) while mounting below my homedir (/home/corsac/tmp/fuse
for example) it doesnt, and shows:
ifuse ~/tmp/fuse --documents com.onlyoffice.Documents -f
Unknown AFC status 32.
When running ls
in a different terminal.
Mounting as root under my homedir works fine (I need to be root to access it but it does work fine)
I tried with the recently released tags for libplist/libusbmuxd/libimobiledevice/ifuse and I still have the same behavior:
- mounting “standard” iphone share works fine as user, as root, in homedir or in /tmp
- mounting an application documents doesn't work as user in homedir but works as root or when mounting in /tmp (and when using ifuse -f it should AFC status 32)
Status 32 is not present in https://github.com/libimobiledevice/ifuse/blob/master/src/ifuse.c#L122 but the libimobiledevice API documentation (https://www.libimobiledevice.org/docs/html/afc_8h.html#a913481f73acbd6026a4663bd7ec3f6c9) indicates it's AFC_E_NOT_ENOUGH_DATA
It seems to have been fixed! Building ifuse
, libimobiledevice
, libplist
, and libusbmuxd
from source has allowed me to mount the documents
folder of an application that was previously unmountable as a non-root user. Thank you!
I've tried to rebuild libimobiledevices against the OpenSSL backends and it seems to work better. I'm trying to have some kind of official statements from Debian ftpmasters that it's ok to do that but I'm still waiting.
Meanwhile, it might be worth having an explicit statement from libimobiledevice authors that it's ok to link that LGPL library with OpenSSL.
Same issue
Unknown AFC status 32.
It works with Linux Mint 19.3 (Ubuntu 18.0.4 apt build) for me, but now it's broken with Linux Mint 20.0 (Ubuntu 20.0.4 apt build)
Mount and list folders/files still works over Nemo
GUI, but it hangs on read or copy files (Both Linux Mint versions)
Same problem here. ifuse --documents
worked fine 18.04, but stopped after upgrading to 20.04. With -f
, it also prints Unknown AFC status 32.
@martinvonwittich Are you building ifuse
, libimobiledevice
, libplist
, and libusbmuxd
from source?
I'm running a 20.04-based distribution and (after building from source, libimobiledevice/master
), it is working for me.
@martinvonwittich Are you building
ifuse
,libimobiledevice
,libplist
, andlibusbmuxd
from source?I'm running a 20.04-based distribution and (after building from source,
libimobiledevice/master
), it is working for me.
No, I was using the standard packages provided by Ubuntu 20.04. I temporarily downgraded to the ones from Ubuntu 18.04 to resolve the issue:
martin@martin ~ % LANG=C apt-cache policy ifuse
ifuse:
Installed: 1.1.3-0.1
Candidate: 1.1.4~git20181007.3b00243-1
Version table:
1.1.4~git20181007.3b00243-1 500
500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
*** 1.1.3-0.1 100
100 /var/lib/dpkg/status
Same problem on Arch 5.9.14, ifuse 1.1.4, libimobiledevice 1.3.0
Have the same error, Unknown AFC status 32.
, on Arch Linux 5.10.10, ifuse 1.1.4 and libimobiledeivce 1.3.0 (installed with package manager). Building from source works fine.
I have two Ubuntu computers, one desktop and one laptop. The desktop is newer with Ubuntu 20.04 LTS and preinstalled libimobiledevce version 1.2.1 and libusbmuxd version 2.0.1. And the laptop is older with Ubuntu 18.04 LTS and preinstalled with libimobiledevce version 1.2.1 and libusbmuxd version 1.1.0. My iPhone just works fine with my laptop but not with my desktop. I mean reading and writing application data. I don't know whether this is caused by version mismatch between libraries on Ubuntu 20.04 LTS. Just my guess. If this is really so, this should be fixed by the Ubuntu package maintainers. I just grew out of the habit of compiling everything myself and relies on the pre-built packages instead.
I can now confirm this is a version problem that comes with Ubuntu 20.04 LTS. The following is what I did to resolve all my problem. I downloaded all the relevant .deb
files from https://packages.ubuntu.com/ and did as follows.
dpkg -i libusbmuxd4_1.1.0~git20171206.c724e70f-0.1_amd64.deb
dpkg -r --force-depends libusbmuxd6
dpkg -i libusbmuxd4_1.1.0~git20171206.c724e70f-0.1_amd64.deb
dpkg -i usbmuxd_1.1.0-2ubuntu0.1_amd64.deb
dpkg -i libimobiledevice6_1.2.1~git20171128.5a854327+dfsg-0.1_amd64.deb
# Optional, if you have the utility package installed.
dpkg -i libimobiledevice-utils_1.2.1~git20171128.5a854327+dfsg-0.1_amd64.deb
# Optional, if you want to use ifuse. I generally just use nautilus instead.
dpkg -i ifuse_1.1.3-0.1_amd64.deb
# Hold the binoic packages to prevent warning.
apt-mark hold libimobiledevice6 usbmuxd libimobiledevice-utils ifuse
Everything works fine now as it did on my laptop with Ubuntu 18.04 LTS.
Ran into the same bug on my Ubuntu 20.04 LTS.
Followed @LeeiFrankJaw's rollback instructions above, ~~and everything works now.~~
Nevermind it only worked slightly better and I'm still having problems with the Nautilus interface. Mounting manually with ifuse works though, so - close enough.
Also, applying this rollback introduces a dependency problem with checkra1n, so I had to uninstall it for the time being.
Had the same issue on Arch Linux 5.12.14-zen1-1-zen
Installing the -git
version from the AUR fixed the issue.
Will there be a new release so we don't need to rebuild all -git
packages? Thanks.
Same issue here. Installing the ifuse-git
package on Arch Linux solved it for me as well.
Same issue here. Installing the
ifuse-git
package on Arch Linux solved it for me as well.
Same
installing ifuse-git leaves me with this error