# Share a network share amongst all jails



## ccnp123 (Jan 26, 2015)

I have a seemingly simple task that I'm too boneheaded to figure out...

I have a samba share mounted on my box that contains files such as web pages. I have jails running different services such as nginx, apache, etc. I would like to find the easiest solution to give all the jails access to these files. 

I can do a 
	
	



```
mount nullfs
```
 to a point inside each jail individually, and this works ok, but it's annoying as I keep adding/removing jails.

I have tried doing a 
	
	



```
ln -s
```
 and a 
	
	



```
mount nullfs
```
 to points inside my basejail, but when I try to 
	
	



```
ls
```
 from inside a jail, I get an empty response.

I hate asking such a dumb question but I can't find the answer or figure this out. Thanks!


----------



## SirDice (Jan 27, 2015)

nullfs(5) is the way to go. You can add the mountpoint to a jail's /etc/fstab.<jailname> to have it automatically mounted when the jail starts.


----------



## ccnp123 (Jan 30, 2015)

Thanks for the suggestion! It works and it's easy enough to copy the fstab files around


----------

