1

I'd like to mount my iPhone 4 filesystem on my Raspberry Pi using iFuse and let other users access this mount point.

I can successful mount the FS as a normal user

[gotschi@berry ~]$ ifuse /media/idevice/

[gotschi@berry ~]$ ls -la /media/        
total 8
drwxr-xr-x  3 root    root  4096 Dec 23 18:04 .
drwxr-xr-x 18 root    root  4096 Jul 22 15:02 ..
-rw-r--r--  1 root    root     0 Dec 23 18:04 1
drwxr-xr-x 17 gotschi users  646 Dec 20 13:38 idevice

[gotschi@berry ~]$ ls /media/idevice/
Books  Downloads     PhotoData  PublicStaging  Recordings  iTunes_Control        youtube-stdout
Airlock  DCIM   HighlandPark  Photos     Purchases      Safari    youtube-stderr

Mounting as a normal user works without any problem. however, this is how the mount looks to root:

[root@berry ~]# ls -la /media/
ls: cannot access /media/idevice: Permission denied
total 8
drwxr-xr-x  3 root root 4096 Dec 23 18:04 .
drwxr-xr-x 18 root root 4096 Jul 22 15:02 ..
-rw-r--r--  1 root root    0 Dec 23 18:04 1
d?????????  ? ?    ?       ?            ? idevice

i can't access idevice/ as root or any other user than gotschi.

I tried ifuse with user nobody (sudo -u nobody /bin/ifuse /media/idevice), but without success (no error, no mount) I also added nobody to groups storage, usbmux and sudo.

What I want to achieve: mount the iPhone at boot and provide access for all users (especially the http user, which will move files using php scripts) I'd guess the right place for this would be a cronjob for a user (e.g. nobody) @reboot.

You may ask why: this is an old carrier-locked iPhone with a broken screen and damaged battery. I use it as a low-power webserver with php, python and mysql. Works perfect thus far, but file transfers over the 2,4ghz Wifi are damn slow :/ Thanks for any hints!

2 Answers 2

2

First enable allow_other in /etc/fuse.conf, then specify it in the parameters:

ifuse MOUNTPOINT -o allow_other
1
  • This should be the accepted answer.
    – Blizz
    Commented Oct 2, 2023 at 12:34
0

I experimented a lot with how ifuse mounts the phone, but had no success.

However, I managed to move my files using a rule in the sudoers file for my script to be run as root (sudo).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .