[Samba] Samba4 hide dot files equivalent

Rowland Penny rowlandpenny at googlemail.com
Thu Apr 24 05:26:18 MDT 2014


On 24/04/14 11:43, Denis Witt wrote:
> On Thu, 24 Apr 2014 11:29:48 +0100
> Rowland Penny <rowlandpenny at googlemail.com> wrote:
>
>> That thread is nearly 6yrs old, and according to the latest smb.conf
>> manpage, 'hide dot files = yes' is actually the default.
> Solution is: hide dot files is not available for a DC.
>
> Regards.
>
>
OK, I added a share to one of my DC's

[testshare]
         path = /home/testshare
         read only = No
         hide dot files = Yes

Reloaded smb config

smbcontrol all reload-config

Created the share dir

mkdir /home/testshare

Changed mode of directory

chmod 0777 /home/testshare

Created a dot file in the dir and changed it ownership to a domain user

touch /home/testshare/.dottest.txt
chown username:Domain\ Users /home/testshare/.dottest.txt

ls -la /home/testshare/
total 8
drwxrwxrwx 2 root         root              4096 Apr 24 12:05 .
drwxr-xr-x 6 root         root              4096 Apr 24 12:04 ..
-rw-r--r-- 1 DOMAIN\username DOMAIN\Domain Users    0 Apr 24 12:05 
.dottest.txt

Go to a windows machine, login as the domain user and open 'My Network 
Places'
Enter into the Address bar '\\dc1\testshare' and press enter

Result -- An empty share, the file .dottest.txt does not show

So to test that I was connected, I created an empty text file 'sharetest'

back to the DC

ls -la /home/testshare/
total 12
drwxrwxrwx  2 root         root              4096 Apr 24 12:07 .
drwxr-xr-x  6 root         root              4096 Apr 24 12:04 ..
-rw-r--r--  1 DOMAIN\username DOMAIN\Domain Users    0 Apr 24 12:05 
.dottest.txt
-rwxrwxr-x+ 1 DOMAIN\username DOMAIN\Domain Users    0 Apr 24 12:07 
sharetest.txt

So it would seem that even though 'hide dot files' is not showing up in 
'samba-tool testparm' it does work

Rowland




More information about the samba mailing list