I build a custom version of samba-4.4.5 with the patch from https://bugzilla.samba.org/show_bug.cgi?id=11994 to make it work with an Azure File Share. This works and I can upload and download files via smbclient.
When mounting the share with SMBNetFS writing doesn't work:
$ cd ./mountpoint/fileshare.file.core.windows.net/share-name
$ echo "test" >> testfile
bash: container: Eingabe-/Ausgabefehler
I started smbnetfs with
$ smbnetfs /media/azure-yaaf/ -d -o direct_io,allow_root,no_remote_lock,umask=0077,quiet_flag=true,no_remote_flock,no_remote_posix_lock,no_splice_write,no_splice_move,no_splice_read,smb_debug_level=10,smbnetfs_debug=10,log_file=/tmp/smbnetfs.log,max_retry_count=1
Any idea whats going on? The share is working fine when using from within windows. I needed to following configs to get it working with smbnetfs:
smbnetfs.conf
auth "yaaf.file.core.windows.net/gentoo-cup" "yaaf" "<snipped>"
smb.conf
client max protocol = SMB3
smb encrypt = mandatory
smbclient is working with the very same config file. My system is gentoo.
Logging (snipped to the relevant place):
unique: 32, success, outsize: 144
unique: 33, opcode: OPEN (14), nodeid: 5, insize: 48, pid: 3880
open flags: 0x8401 /yaaf.file.core.windows.net/gentoo-cup/Seafile/container
2016-07-16 17:56:50.421 7437->function_open: (/yaaf.file.core.windows.net/gentoo-cup/Seafile/container, flags=102001, fh=0)
2016-07-16 17:56:50.421 7437->smbitem_what_is: path=/yaaf.file.core.windows.net/gentoo-cup/Seafile/container
2016-07-16 17:56:50.421 7437->samba_get_ctx: name='/yaaf.file.core.windows.net'
2016-07-16 17:56:50.421 7437->samba_get_ctx: ctx_total=15, list=(/yaaf.file.core.windows.net[1], /[0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0])
2016-07-16 17:56:50.421 srv(7459)->smb_conn_srv_listen: process query=0, query_len=73
2016-07-16 17:56:50.422 7437->smbitem_get_group: host=yaaf.file.core.windows.net
2016-07-16 17:56:50.422 7437->auth_get_authinfo: domain=, server=yaaf.file.core.windows.net, share=gentoo-cup
2016-07-16 17:56:50.422 7437->auth_get_authinfo: domain=, user=yaaf, password=*, suitability=5
map_open_params_to_ntcreate: fname = \Seafile\container, deny_mode = 0x41, open_func = 0x1
map_open_params_to_ntcreate: file \Seafile\container, access_mask = 0x120116, share_mode = 0x3, create_disposition = 0x1, create_options = 0x40 private_flags = 0x0
2016-07-16 17:56:50.422 srv(7459)->smb_conn_srv_auth_fn: url=smb://yaaf.file.core.windows.net/gentoo-cup, grp=, user=yaaf, passwd=*
encrypt SMB2 message
decrypt SMB2 message
encrypt SMB2 message
decrypt SMB2 message
encrypt SMB2 message
decrypt SMB2 message
encrypt SMB2 message
decrypt SMB2 message
2016-07-16 17:56:50.481 srv(7459)->smb_conn_srv_open: errno=6, Kein passendes Gerät bzw. keine passende Adresse gefunden
2016-07-16 17:56:50.481 7437->process_kill_by_smb_conn_fd: closing child connection with pid=7459, fd=7
2016-07-16 17:56:50.484 7437->process_cleanup_from_zombies: R.I.P. child with pid=7459, fd=-1
2016-07-16 17:56:50.484 7437->process_cleanup_from_zombies: cleanup child record with pid=7459
I noticed the same issue if I try to write to a Windows share via smbnetfs in the way you described. Have you found a solution?
I have created a question on SO => https://stackoverflow.com/questions/73104395/smbnetfs-how-to-resolve-input-output-error-while-writing-file-to-windows-serve
Last edit: joachim-f 2022-07-26