[CentOS] Hiding Files in Samba

Miguel Medalha miguelmedalha at sapo.pt
Sun Nov 9 01:21:31 UTC 2008

> I may need a strong shot of coffee but I though
> putting "hide files = /~*/" as follows in the 
> samba config file would hide files with a tilde.
> [homes]
>    comment = Home Directories
>    browseable = no
>    writable = yes
>    hide files = /~*/
> Unfortunately after restarting the server the files
> are still visible.
If you have Windows Explorer set to show hidden files, they will appear 
in a dim color.

Quoting from the book "Using Samba" at 

Instead of simply hiding files beginning with a dot, you can also 
specify a string pattern to Samba for files to hide, using the |hide| 
|files| option. For example, let's assume that we specified the 
following in our example |[data]| share:

hide files = /*.java/*README*/

"If we want to prevent users from seeing files at all, we can instead 
use the |veto| |files| option. This option, which takes the same syntax 
as the |hide| |files| option, specifies a list of files that should 
never be seen by the user. For example, let's change the |[data]| share 
to the following:

veto files = /*.java/*README*/


More information about the CentOS mailing list