Access to SMB Share - Error: File exists

07-03-2018, 2pm CET - First post updated to reflect current situation

Situation:

  • I switched my operating system from Openmediavault to Debian Stretch.
  • I have a self configured NAS (Mini ITX, Intel Celeron J3455 (4x 1.5GHz, Turbo, 10W TDP), ASRock J3455-ITX)
  • On this NAS I configured a very slim samba configuration based on this tutorial (Samba Freigabe mit Authentifizierung – Thomas-Krenn-Wiki)
  • I have a very slim global config

[global]
workgroup = workgroup
security = user
map to guest = never

  • And this is the example of my share drive configuration

[Drive]
valid users = nas
path = /media/disk1/Drive
public = no
writable = yes
comment = smb share
printable = no
guest ok = no
create mask = 0600
directory mask = 0700

Issue:

I’m able to access with Windows and solid explorer (Android app). But not with Kodi/OSMC. I receive the error message "File exists". Here you can find the log: http://paste.osmc.tv/uqufanukab

What I did so far:

  • I added min protocol = smb2 to the global configuration (smb.conf) on my server
  • I changed the Kodi/OSMC setting for the SMB client to “max protocol smb2”

Anybody a idea how to resolve?

Follow up question: Has Kodi, OSMC or the Vero 4k any limitation to the SMB protocol version (1,2 or 3)? Maybe the issue is related to this? I will try to change the settings in my samba.conf on the server but wanted to know if this may be the reason before.

SMB1 is disabled for security reasons and would need to be manually enable if required.

I added min protocol = smb2 to my samba config. But the error message still occurs. I can see the shares but not access them or add them. I also are not asked to provide username and password. Is there any config file or temp file in osmc which I can clear to reset samba configurations in osmc?

One addition: If I change the settings in the SMB Client settings in Kodi to “min protocol version” to “smb2” I’m not able to find the shares anymore. Is this a potential hint to the solution?

This would indicate that you server is still running at smb1 as browsing is only possible with smb1

Hi, I thought the same. But I also use the solid explorer of my smartphone to access the SMB share and I needed to change the settings from solid explorer from smb1 to smb2 to get access after I changed it on my server. So it seems to be smb2. How can I check? I will try to add a specific protocol protocol = smb2to the smb.conf

I also installed Kodi on my smartphone and tried to add the SMB share there. No success. So now I’m pretty sure that this is related to my SMB share or server configuration. I’m running a NAS with Debian stretch.

Can someone maybe share there global and one example share drive configuration out of the smb.conf file? I would like to compare. I will share my setting later the day as I will be back at home.

Did you try Max Protocol 2 on Kodi?

Install the Samba Server from the App Store on the Vero and take that as an example.

here…

Similar but not same issue. I already changed the SMB protocol version and I don’t have the drive mounted yet.

@MelBourbon Reading this thread I’m a little be confused what has been changed where. So my questions:

  • What NAS is it (model, brand, etc.)?
  • Obviously you use at the moment the built-in Samba code of Kodi. For that you can use the GUI Settings → Services → SMB Client → Max Protocol Version to influence behavior.
  • If you mean by changing the smb.conf on your samba server, have a look at smb.conf

As you can see there you could influence the protocol negotiation using server max protocol and server min protocol in the global section using one of the options ‘CORE, COREPLUS, LANMAN1, LANMAN2, NT1, SMB2_02, SMB2_10, SMB2_22, SMB2_24, SMB3_00, SMB3_02, SMB3_10, SMB3_11 or SMB2_FF’.

Btw. the client code on the OSMC side should also respect the settings in the local /etc/samba/smb.conf

@JimKnopf Sorry for creating this confusion. My initial root cause was wrong.

  • The main reason is that I switched my operating system from Openmediavault to Debian Stretch.

  • I have a self configured NAS (Mini ITX, Intel Celeron J3455 (4x 1.5GHz, Turbo, 10W TDP), ASRock J3455-ITX)

  • On this NAS I configured a very slim samba configuration based on this tutorial (https://www.thomas-krenn.com/de/wiki/Samba_Freigabe_mit_Authentifizierung)

  • I have a very slim global config

    [global]
    workgroup = workgroup
    security = user
    map to guest = never

Issue:

  • I’m able to access with Windows and solid explorer (Android app). But not with Kodi/OSMC. I receive the error message from first post (log also there)

What I did so far:

  • I added min protocol = smb2to the global configuration on my server

Switch the SMB protocol under Kodi/Settings as I indicated. Try Max Protocol 1 or 2

I did. This leads to a very strange behavior that with this I’m not able to see the shares anymore. Different to before where I’m able to see but not open/add them.

With Max protocol 1?

With 2 that would be expected

With max protocol 2. I need to try it with max protocol 1. But why should this be different. If my min protocol on the server is 2 and my max on Kodi is 1 it should not work, correct?

PS: I added my share drive configuration to the first post. Please check if you see something wrong there.

I found this:

With SMB2 and SMB3 browsing for servers is broken, but you can add them manually and then SMB2/3 will work.

here: Supported samba protocol versions?

And this was the clue. With SMB2 or SMB3 you can not browse anymore. You need to add the exact share including username and password in Kodi and then it worked.

I also changed the SMB-Client Settings in Kodi to

min protocol = SMB2
max protocol = SMB2

But maybe this is not needed anymore.

Well not sure if you missed my post earlier

@fzinken Sorry, I has misunderstood this at this time. Thanks for your support.

I think it is also quite well documented in this wiki