Bug 6047 - "Hide Dot Files" parameter has no effect
Summary: "Hide Dot Files" parameter has no effect
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.28
Hardware: Other Windows XP
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-17 03:24 UTC by rvjcallanan
Modified: 2009-01-19 06:48 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rvjcallanan 2009-01-17 03:24:31 UTC
I'm using Samba on RedHat 5/CentOS 5 platforms Samba Version 3.0.28-1.el5_2.1
I just noticed that the "Hide Dot Files" parameter has no effect. Dot files or folders are never hidden when viewed in a Windows Explorer client regardless of this setting in smb.conf. Try it yourself!! 

It is possible that this bug has not been spotted as Dot files are a rarity in Windows. In fact a Windows user cannot directly name (or rename) files with names starting with a Dot. However, the Windows API obviously supports Dot file naming as a number of Windows applications (usually with a Linux heritage e.g. GIMP, Eclipse) use filenames starting with a dot, and windows does NOT show them as hidden.

Here are the relevent lines from from my test share in smb.conf file

hide dot files = yes # or no (it has no effect)
dos filemode = yes
store dos attributes = yes
map archive = no
map hidden = no
map read only = no
map system = no
Comment 1 Jeremy Allison 2009-01-18 20:53:44 UTC
Please try and reproduce this on a later Samba (3.2.7).
Thanks,
Jeremy.
Comment 2 rvjcallanan 2009-01-19 05:30:26 UTC
(In reply to comment #1)
> Please try and reproduce this on a later Samba (3.2.7).
> Thanks,
> Jeremy.
> 

Sorry, I am not at liberty to custom compile latest Samba version on my production box and I do not have separate test machine at the moment.

Has anyone else got a stable 3.2.7 test bed at their disposal?
It would only take a few minutes to try out this parameter.

If the problem has been fixed, I will put in a request with my distro vendor to have it back-ported although there does not seem to be anything obvious in the changelog.

Rgds,
Vincent
Comment 3 Volker Lendecke 2009-01-19 05:43:18 UTC
Just tried with the current v3-0-test branch as well as with v3-2-test which is about to become the next 3.2 release. Both work fine.

Is it possible that you have your folder options in the Windows explorer set in a way that hidden files are always shown?

Volker
Comment 4 rvjcallanan 2009-01-19 05:56:53 UTC
(In reply to comment #3)
> Just tried with the current v3-0-test branch as well as with v3-2-test which is
> about to become the next 3.2 release. Both work fine.
> 
> Is it possible that you have your folder options in the Windows explorer set in
> a way that hidden files are always shown?
> 
> Volker
> 

Thanks for perfoming test Volker!
My folder options are fine in Windows Explorer

Can you verify that your test share had the following parameter settings (as these could be pertient to the problem):
 
dos filemode = yes
store dos attributes = yes
map archive = no
map hidden = no
map read only = no
map system = no

As you can see I'm using XATTR to map hidden attributes.

Rgds,
Vincent

Comment 5 Volker Lendecke 2009-01-19 06:11:58 UTC
Yes, I did the test with that setting. If you are using "store dos attributes = yes", then those attributes take precedence over what "hide dot files" says. For a test try to remove user.DOSATTRIB from a dotted file. Then "hide dot files" should work. If user.DOSATTRIB exists, then we don't look at the "hide dot files" parameter anymore. This is intended behaviour.

Volker
Comment 6 rvjcallanan 2009-01-19 06:14:19 UTC
Sorry Guys,

I've been wasting your precious time.
Please accept my apologies!

FYI, I was editing the wrong smb.conf file - no wonder it did not have any effect!

Vincent
Comment 7 rvjcallanan 2009-01-19 06:48:11 UTC
(In reply to comment #5)
> Yes, I did the test with that setting. If you are using "store dos attributes =
> yes", then those attributes take precedence over what "hide dot files" says.
> For a test try to remove user.DOSATTRIB from a dotted file. Then "hide dot
> files" should work. If user.DOSATTRIB exists, then we don't look at the "hide
> dot files" parameter anymore. This is intended behaviour.
> 
> Volker
> 

Our last two posts clashed so I did not have a chance to read your user.DOSATTRIB clarification before issuing my premature Mea Culpa.

It is possible that I was in fact editing the correct smb.conf file but may have been thrown by the subtleties involved.

In my most recent test, I simply created a dot file from a Linux shell and the "hide dot files" setting worked as expected. This is of course because there was no user.ATTRIB associated with the file as Samba had been effectively bypassed.

My original "bug" report probably came about because I copied a dot file (not hidden) from my Windows client to the samba share and this did not show up as hidden as I expected - and that is precisely because the copy operation copied the hidden attribute which, as you say, takes precedence over the "hide dot files = yes" directive.

So, in summary, for anyone else who might run into this issue, if you have a "store dos attributes = yes" directive (and the file system supports xattrs), the "hide dot files" directive only comes into play when a file is created on the host OS side i.e. when there will be no associated user.DOSATTRIB.

And this behaviour is perfectly correct!

Very subtle indeed!
Thank you for clarification.