[Samba] Restricted folder inside public share

Carsten Gehling carsten.gehling at gmail.com
Wed Jun 29 07:16:46 GMT 2005

I've been assigned the task to make a fileserver with the following

  +---- public       <--- Shared folder without password
        |                  restriction
        +---- event  <--- Subfolder that requires
                          valid username/password

I use Samba 3.0.12 installed on a FreeBSD from the ports collection.

The anonymous share-folder "public" is easy enough. My samba.cnf contains;
security = share

  comment = %h Shared Public Directory
  path = /usr/home/samba/public
  force directory mode = 0777
  force create mode = 0777
  force group = samba
  force user = samba
  public = yes
  writeable = yes
  read only = no
  inherit permissions = Yes
  map archive = No

And the folder /usr/home/samba/public looks like this:
drwxrwxr-t  3 samba  samba  512 Jun 27 13:16 public

But what should I do with the subfolder "event"?

>From a users point of view, the folders should work like this:

1) I open \\my-samba-server\public - The folder is opened without any
username/password requests. Inside this folder I can create files and

2) Inside \\my-samba-server\public there is a sub folder called
"event". If I try to open this, I will be prompted for
username/password before access is granted.

How do I do that? Is it at all possible, or can I only make it with
"event" as a separate share?


- Carsten

More information about the samba mailing list