Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there anyway I can allow a group only to see only certain (two) folders in a directory I wish to share?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Both Windows and Linux work under the assumption that you can see anything in a directory you have access to, but getting past that point is up to the ACLs on that directory.

In a pure Windows environment, Server 2003r2 and later has something called "Access Based Enumeration". When enabled on a share, it will only display folders that users have some kind of access into. The classic example is a homes share.

\\winsrv\homes\

With ABE, users would only see "\winserv\homes\myusername", where without ABE they'd see the entire user list.

This is handled at the share level, not the rights level. Your Samba config will need the following lines on your share definition should emulate this behavior:

hide unwriteable = yes
hide unreadable = yes

These will hide directories that can't be read/written by the user, based on their access rights.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.