File transfer fails: iPhone to Samba on Ubuntu
I am trying to transfer files using the Files app between an iPhone 8 running iOS 16.5.1 and a PC running Xubuntu 22.04. I am posting it here because SMB transfer to a Synology NAS works fine so I don't blame the phone.
An attempt to upload e.g. a file "IMG_8833.JPG" to the PC results in an error message on the phone: Code:
The operation couldn't be completed. File name too long The upload directory is defined thus in /etc/samba/smb.conf (output of testparm): Code:
[global] Code:
To Action From Code:
2023/07/12 16:34:30.549598, 0] ../../source3/smbd/server.c:1734(main) Any pointers? Any other information I should post? Thank you |
Strange. Maybe play with the encoding or crank the logging up to see if there's more clues.
Code:
[global] |
So I set the two charsey parameters and set loglevel=4.
With a different image I now get another error message: Code:
The operation can't be completed because some data in "IMG_1683.jpeg" can't be read or written. (Error code -36) FWIW, I had also changed the firewall rules to be explicit: Code:
139,445/tcp ALLOW 192.168.1.0/24 # Samba tcp I go to Files, hit Select, check one file in Downloads, then hit the folder icon at the bottom, navigate to Shared and the line for the PC (id'ed by its IP address). That displays an icon for the Public directory and at the bottom of the page 1 item, x read-only. That is wrong, the file x is not there anymore, I deleted it yesterday. When I tap on Public it says, correctly, "Folder is empty" and at the top appears copy. Tapping that results in the error message listed above. |
In the [homes] section of my smb.conf, I have
Code:
; For iPhone |
Thank you but it didn't work for me. After reading the reference you provided I added to the Global section:
Code:
fruit:aapl = yes Code:
vfs objects = catia fruit streams_xattr BTW, before I navigate into the share it still shows the non existing file. I wonder whether that is a clue? Anyway, thank you for trying to help. Any other things to try? |
Your settings in the {Global] section are unnecessary. Samba will use the settings as they are the defaults.
Some settings in the {Public] section have settings that are different from the defaults. Specifically: Code:
readdir_attr:aapl_max_access = no |
I did as you suggested, allend, i.e. only the vfs objects line left, and after testparm and systemctl restart smbd the result is still Input/output error.
Any other ideas? |
Sorry, no more ideas. I have the same phone and iOS version and have no problems using the Files app to connect to my Linux PC via Samba using the additional configuration I described.
My share definition looks like this: Code:
[ShareName] |
Oh well.......
So I copied your setup exactly, restarted smbd, and it still said "Input/output error when trying to copy files there. Then it occurred to me to "eject" and and reconnect to the server on the phone, and voila, it works! So I assume the vfs objects line is really all it took, and the phone just doesn't read any new connection parameters from the server unless makes a new connection. Lesson learned. Thank you very much for your help, allend |
Fruit works!
Adding
Code:
vfs objects = catia fruit streams_xattr Thanks for the fix! |
Addendum
Good to hear it helped you, geoffp.
Just today I meant to add one more observation of my own: It is still annoying in that almost every day (but I'm not using it every day) the "input/output error" reappears and I have to "eject" the PC and reconnect. That always works but still, it is not necessary on the NAS. Now I am guessing the difference could be that I suspend the PC overnight so the phone gives up on it but the NAS is always up - any opinions on that? |
I can’t say for sure, but I wouldn’t be at all surprised if suspending the PC forces you to re-establish the connection. Samba is a very server-y thing to do, and suspend / resume is not.
Should be easy to test though! |
aye
Quote:
|
All times are GMT -5. The time now is 06:44 AM. |