Other sftp, chrooted, shared folder with data from multiple zfs locations, nullfs

I have multiple location where specific files are stored and would like to enable access to them using sftp.

Within each home directory I wanted to add public directory where each of locations would have its separate directory.

I have tryed to use nullfs and create public directory outside users home where I would for instance mount:
/public/dir1 nullfs mounted from /zpool1/data1
/public/dir2 nullfs mounted from /zpool2/data2

Then each user would have /public mounted into his home. The first part works flawlessly but the issue comes when
I try to mount public into users home as it is empty. I don't know what the issue is, is nullfs not supporting nested
mount-points? Do you have some suggestion, how to accomplish this?
 
I have written a rc.d script to mount them directly into sftp home at boot but this is just too much hassle... this should be somehow available by other means.
 
Back
Top