2

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:

[global]
        workgroup = SAMBA
        security = user
        hosts allow = 192.168.1.40 #(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


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

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

Firewalls are disabled on both sides.

Windows gives the error:

Windows cannot access \\192.168.1.20\testshare

You do not have permission to access \\192.168.1.20\testshare

0

1 Answer 1

3

You've got two issues here

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

  2. You have a hosts allow = 192.168.1.20 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 192.168.1.20, showing that your client can't be 192.168.1.20. 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.

8
  • 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 .