ubuntu 22.04 (ksmbd v3.4.2) , mount.cifs is ok, but some simple file io ops are failed? #602
Description
Issue
See title, how can I get it correctly when using ksmbd. Just simple file ops would not be successful. ANY SUGGESTION or docs to follow。
Setup
linux version: ubuntu 22.04 kernel 5.15.0-87-generic
Version of kmod: ksmd ksmbd version : 3.4.2
Version of tools: git master
Expected behaviour
Files copy normally
I follow the ksmbs_tools 's step to share dictory, like below:
`
mkdir -vp $HOME/MyShare
sudo ksmbd.addshare --add
--option "path = $HOME/MyShare"
--option 'read only = no'
MyShare
sudo ksmbd.addshare --update MyShare
sudo ksmbd.adduser --add ubuntu
sudo ksmbd.addshare --update
--option "force user = $USER"
--option "force group = $USER"
MyShare
`
next, mount it normally.
sudo mount -o user=ubuntu //127.0.0.1/MyShare /mnt/smb
then, some file ops in the mountpoint /mnt/smb
sudo su root vim /mnt/smb/testfile01.txt // E667: Fsync failed echo "test" > /mnt/smb/testfile02.txt // no error occors, but file lenth is zero.
Why? How can I edit the ksmbd.conf, or update ksmbd version to newest version?
ksmbd.conf
`
[global]
; global parameters
bind interfaces only = no
deadtime = 0
guest account = nobody
ipc timeout = 0
map to guest = never
max active sessions = 1024
max connections = 128
max open files = 10000
netbios name = KSMBD SERVER
restrict anonymous = 0
server max protocol = SMB3_11
server min protocol = SMB2_10
server multi channel support = no
server signing = disabled
server string = SMB SERVER
share:fake_fscaps = 64
smb2 leases = no
smb2 max credits = 8192
smb2 max read = 4MB
smb2 max trans = 1MB
smb2 max write = 4MB
smb3 encryption = auto
smbd max io size = 8MB
tcp port = 445
workgroup = WORKGROUP
browseable = yes
create mask = 0744
crossmnt = yes
directory mask = 0755
force create mode = 0000
force directory mode = 0000
guest ok = no
hide dot files = yes
inherit owner = no
oplocks = yes
[public]
comment = share folder
browseable = yes
path = /home/ubuntu/MyShare
valid users = ubuntu
force user = ubuntu
public=yes
writeable=yes
available=yes
`