# Samba Fileshare Subdirectory



## malice987 (May 5, 2018)

Hi,

I am trying to run a Samba server to share files in the following way:

There are two users, both with their own fileshares in /home/$U on the samba server

I want to be able to log into the samba server on a user account, under \\server\home\User, and be able to roam back to \\server\home, where I intend to have a public share for both users also.

Both user shares need to be password protected, so the other user cannot look at the other fileshare.

The following does what I am looking to do, except without the subdirectory \home, so this is my main problem.


```
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

   [User1]
   valid users = User1
   path - /home/User1
   writeable = yes
   browsable = yes
   writable = yes
  
   [User2]
   valid users = User2
   path = /home/User2
   browseable = yes
   writeable = yes
```

If someone could point me in the right direction, that would be great


----------



## VladiBG (May 5, 2018)

Don't use the "home" as the rood directory for your public share. You can create another directory for example /home/public and share it for all users with write permissions.

Edit:
you can also restrict users with "valid users" per share"


----------

