[Samba] Hiding shares and/or their contents from Windows Explorer

John H Terpstra jht at samba.org
Wed Nov 27 20:12:01 GMT 2002


On Wed, 27 Nov 2002, Irving Carrion wrote:

> I'm fairly new to Samba but I'll throw in my .5 cent in, I would disable
> nmbd and map the app to the static ip of the samba machine.

Not quite! nmbd advertises only the server by UDP broadcasts.

You can hide shares by putting in smb.conf ["share_name"] browseable = No.
This stops shares from appearing in the browse list, but if the share is
available then any user who knows it exists can still reach it.

You can only "hide" share contents by setting Linux/Unix file/directory
permissions. In this case you need to set the directory at the share top
level so that no-one can list the share contents. The r bit on a directory
controls listing ability for directory contents.

It has the side-effect that you can not delete a file within the top level
directory, but you can edit it and you can rename it - if you know the
name of the file. So to get around this limitation, you place all your
files in a directory that has the r bit set as required
(user/group/others) and allow file operations in that directory. Within
the top level of the sahre the files and directories will be invisible -
no matter what you set MS Windows Explorer settings to.

The above is all basic Unix/Linux file permissions handling information
and has NOTHING to do with Samba as such.

So far as the Samba "hide unreadable" and "hide files" options allow you
to do what you want with the caveate you have already noted. Users can
tell their explorer to show hidden files and then 'there they are(tm)'.

So, in conclusion, you need to control file/directory access at the file
system level.

- John T.

>
> -----Original Message-----
> From: samba-admin at lists.samba.org [mailto:samba-admin at lists.samba.org]
> On Behalf Of Darin DeCounter
> Sent: Wednesday, November 27, 2002 1:56 PM
> To: samba at lists.samba.org
> Subject: [Samba] Hiding shares and/or their contents from Windows
> Explorer
>
> Is anyone of aware of any known problems with Samba 2.2.2 and Windows
> 95,
> dealing with hiding shares and/or their content from Windows Explorer?
> We
> need to map these shares so our application can function properly...but
> the
> shares and/or their content should never be accessible via Windows
> Explorer.  We have browseable = no for the shares.  We also tried the
> "hide"option, but the user can simply change Windows Explorer setting to
>
> view hidden files.  It was suggested we consider poledit, but the option
> to
> hide drives is "all or nothing", meaning we'd have to hide C drive too
> (which we don't want).  I looked into TweakUI, but the changes are only
> temporary and reset to original setting after restarting Windows 95.
> Any
> suggestions would be appreciated.   Thanks.
>
>

-- 
John H Terpstra
Email: jht at samba.org




More information about the samba mailing list