Ubuntu: Samba cannot access sub-directories [closed]



Question:

I have added this in my /etc/samba/smb.conf

[srv]     comment = another share     path = /srv     browseable = yes     create mask = 0777     directory mask = 0777    [slash]     comment = another sharedsad     path = /     browseable = yes     writable = yes     create mask = 0777     directory mask = 0777  

I can easily access sub-directory inside \\IP\srv\ but I cannot do so with \\IP\slash\.

SMB server is installed in a Linux Mint 17.3 VM and I am trying to access it from a windows host.

smbclient on guest is giving error too NT_STATUS_ACCESS_DENIED listing \bin

Logs say:

[2016/02/01 03:42:52.256236,  0]         ../source3/param/loadparm.c:4365(process_usershare_file)    process_usershare_file: stat of /var/lib/samba/usershares/vk failed. No such file or directory  

Update: I just tried the same configuration in a complete new Digital Ocean droplet. It also gave the same error there too


Solution:1

This turned out to be a bug introduced in Samba 4.1+ https://www.turnkeylinux.org/forum/support/20160104/samba-updated-and-broke-root-share-any-ideas

There are two workarounds for this:

A) Enable symlinks. Add this to your smb.conf

[global]      wide links = yes      unix extensions = no  

B) https://bugzilla.samba.org/show_bug.cgi?id=11647#c7

mkdir /mnt/root  mount -o rbind / /mnt/root    and use "path = /mnt/root" instead of "path = /"  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »