[Samba] freebsd samba sharing problem hiding folder based upon membership

Rowland penny rpenny at samba.org
Wed Apr 28 08:38:52 UTC 2021


On 28/04/2021 09:08, Peter Boos via samba wrote:
> Hello
>
> On a Freebsd system with samba.
>
> How to set a shared directory so that only the users who are allowed to read or modify, can see only that particular directory in which they have those rights
> So they cannot see other folders listed on this level of the directory. ea each user get a different list of folders shown based upon their group memberships.
>
> There is a directory tree shared, for each subfolder a group modifiers and readers, has been made with a group-name based upon their folder.
>
> users can be member of some subfolders in the reader or modifier role, and should not see folder listed where they don't have access to.
>
>
> Under windows this is possible (List permissions).
> Under Freebsd I had mixed results, usually users see all folders (which i dont want) but can dive only into the folders they have permissions on.
> Sometimes I added a new user to the root of the share and from that moment on, he saw only his folder + all new folders made after the share was given.
>
>
>
> I tried a lot of chmod setfacl options, and am not sure anymore if that would be enough.
> Maybe smb service has to be configured to allow something with enumeration folder traversing.
> Afterall its the sharing service that provides the folder list towards the client..but what option to set if so ?.
>
> If someone is familiar with the problem, and solved it.
> What was your permission setup of root, and sub folders ?, by example of what commands?


Have a look at 'access based share enum' in 'man smb.conf' , this makes 
a share invisible to users that do not have read or write permissions.

Rowland





More information about the samba mailing list