“The operation couldn’t be completed”/”Operation canceled” error message when saving to a Samba share via Files app

Networksharingsmbunix

I'm using the Files app on my iPhone and iPad to save photos to an SMB network share provided by Samba on an Ubuntu 20.04 server.

Since around iOS/iPadOS 14.5, trying to save a new file to the share results in an error message saying:

The operation couldn't be completed
Operation canceled

Since nothing has changed server-side, this looks like a bug in iOS/iPadOS. How can the described problem be solved?

Best Answer

There does not seem to be any documentation from Apple on changes related to SMB in iOS/iPadOS 14.5. However, the following configuration change on the Samba server restores Files app functionality:

  • Install the Samba package containing VFS modules (on Ubuntu via apt install --no-install-recommends samba-vfs-modules)
  • Add the following line to your Samba configuration (on Ubuntu in /etc/samba/smb.conf) in the [global] section or in the relevant share section: vfs objects = fruit streams_xattr
  • Restart Samba (on Ubuntu via systemctl restart smbd.service)

You might need to reconnect the share in the Files app. Afterwards, saving new files to the share should work again.

Documentation for the fruit SAMBA VFS module can be found at https://www.samba.org/samba/docs/current/man-html/vfs_fruit.8.html.