[Samba] Random EINVAL when opening files with SMB3 POSIX extensions enabled

Rowland Penny rpenny at samba.org
Thu Nov 28 09:34:50 UTC 2024


On Tue, 26 Nov 2024 17:03:04 -0500
Andrew Gunnerson via samba <samba at lists.samba.org> wrote:

> Hello!
> 
> I recently tried enabling SMB3 POSIX extensions as I'm only using
> Linux clients and would like to make use of the standard unix
> permission bits. However, I'm running into an issue where a simple
> `cat` fails with -EINVAL when opening the file:
> 
>     openat(AT_FDCWD, "Shells.txt", O_RDONLY) = -1 EINVAL (Invalid
> argument)
> 
> The weird thing is that it's intermittent. It'll fail with EINVAL
> many times in a row and then suddenly work and then start failing
> again. When it fails, I see a message like this in the client's dmesg:
> 
>     [ 4295.972953] CIFS: enabling forceuid mount option implicitly
> because uid= option is specified [ 4295.972958] CIFS: enabling
> forcegid mount option implicitly because gid= option is specified [
> 4295.972961] CIFS: Attempting to mount
> //sm-1.int.chiller3.com/home/Documents/Notes/Linux/Shells.txt [
> 4295.974221] CIFS: VFS: cifs_mount failed w/return code = -22
> 
> (The `log level = 3` samba logs are included at the end of this
> email.)
> 
> If I turn off SMB3 POSIX extensions, then this issue never occurs.
> 
> On the server side, there isn't really anything special. There are
> only the standard Unix owner/group/mode set. The file in question and
> all parent directories have no POSIX ACLs nor NTACL xattrs.
> 
> My server configuration is:
> 
>     [global]
>         workgroup = SAMBA
>         security = user
> 
>         passdb backend = tdbsam
> 
>         printing = cups
>         printcap name = cups
>         load printers = yes
>         cups options = raw
> 
>         store dos attributes = no
>         server min protocol = SMB2

I do not use the SMB3 Unix extensions, but perhaps you may not be
either, have you tried replacing 'server min protocol = SMB2' (which is
the default anyway) with 'server min protocol = SMB3' ?

Rowland



More information about the samba mailing list