Two servers in the same network, a Windows server (client), and a Linux server (samba share host)

The shared folder can be seen by the client but not accessed. See below for the configuration: smb.conf:

        workgroup = SAMBA
        security = user
        hosts allow = #(windows server)
        passdb backend = tdbsam
        bind interfaces only = yes
        netbios name = test-server
        server role = standalone server
        log file = /var/log/samba/%m
        log level = 1

  path = /home/smbuser/testshare
  read only = no
  guest ok = yes
  guest only = yes

drwxrwsrwx. 2 smbuser examplegroup   6 Sep  6 16:34 testshare

Firewalls are disabled on both sides.

Windows gives the error:

Windows cannot access \\\testshare

You do not have permission to access \\\testshare


1 Answer 1


You've got two issues here

  1. You're trying to access \\testshare instead of \\\testshare. I'm going to assume that's a typo but it's important to be precise

  2. You have a hosts allow = entry in the smb.conf. The documentation (man smb.conf) describes this value as "This parameter is a […] set of hosts which are permitted to access a service". However, from your Windows client you're trying to access a server on address, showing that your client can't be As a result any service will be refused.

    Temporarily, remove the hosts allow entry (comment it out) and test that you have connectivity. When you have confirmed this, put the line back but with the correct client IP address.

  • Hello Sir, thank you for your reply, I made alot of typos. the "host allow" IP was set correct but i changed it here out of habit. Anyway the shares can be seen by the windows server but not accessed, then i get the permission alert. but as far i can see it should be accessable.
    – Tango
    Sep 19 at 8:14
  • I'm sorry, but if you give us incorrect information you will likely get incorrect answers Sep 19 at 9:33
  • Have you looked at the SELinux tags for the part of the filesystem you want Samba to access, @Tango? Sep 19 at 10:12
  • So i made a new folder on /mnt and edited the smb.conf and now i can access this new folder from the windows server but not write ;/
    – Tango
    Sep 20 at 8:23
  • Directory permissions for /mnt please? Sep 20 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .