Strange behavior concerning CIFS

Hi there,

when mounting an cifs share I use a systemd automount. The mount unit is

[Unit]
Description=Mount Share at boot

[Mount]
What=//192.168.0.185/share
Where=/mnt/cifs/share
Options=_netdev,username=...,password=...,iocharset=utf8,rw,vers=1.0,gid=1000,file_mode=0664,dir_mode=0775
Type=cifs
TimeoutSec=5
ForceUnmount=true

[Install]
WantedBy=multi-user.target

and the corresponding automount unit

[Unit]
Description=Automount share

[Automount]
Where=/mnt/cifs/share

[Install]
WantedBy=multi-user.target

Mounting works, but for some reason I cannot do this

mv /mnt/cifs/share/test/testfile.tmp /mnt/cifs/share/test/testfile

(anymore?!?) where both file exists. Expected behavior should be that testfile is overwritten. I have a fresh install of EOS and can also reproduce this in a live system. In addition it works in an Manjaro install. What am I missing here?

Thanks in advance,

Christoph

What is it showing when you’re attempting that? The error or warning details will be necessary.

[csteinforth@EOS ~]$ mv /mnt/cifs/share/test/testfile.tmp /mnt/cifs/share/test/testfile
mv: das Verschieben von '/mnt/cifs/share/test/testfile.tmp' nach '/mnt/cifs/share/test/testfile' ist nicht möglich: Die Datei existiert bereits

Moving the file is not possible, because file already exists.

Could you provide your mount options please :slight_smile:

See my first post! Same options are used in the Manjaro install.

Try adding nodfs mount option.

Hmmm no change.

I will take a look later and let you know.

I solved it somehow, although it is a little bit weird. My NAS storage is already a little bit old, but there is an option to enable SMB2. Enabling this and changing vers=1.0 to vers=2.0 in my mount options solve this issue. So I did another test with the EOS iso from May. There it also works with SMB2 disabled and the vers=1.0 option. In the current July iso it did not work with this setup so I guess there must be a change somewhere in cifs area. Any idea on this?

Christoph

1 Like

Here is an insteresting web page

That was dated Sep 16 2016. So it might be that although smb1 was deprecated but still available, it is now gone with the wind.

Pudge

2 Likes

Seems so but I cannot find anything about this :thinking:

1 Like

it remembers me the Samba story with smb and licencing ! :dancer:

https://www.samba.org/samba/ms_license.html

1 Like