I use bindfs with osxfuse and sshfs to mount specific folders (chroot) to allow sftp access for external users (macOS Sierra 10.12).
Binding a readOnly folder for the user "sftpusr" is done with
bindfs -r -u sftpusr /volume/folder /chroot/folder
The folder is correctly bound, I can login using sftp and listing the folder once only – then folders and files disappear, I need to mount and bind again.
There is no difference in using either homebrew to install osfuse, sshfs, bindfs or making my "own" binaries.
I had this feature running for years (Mavericks, Yosemite). Is this an incompatibility with macOS Sierra?
Best Answer
I had no luck getting bindfs and osfuse up and running with macOS Sierra. So I configured a virtual machine instead on top of CentOS 7, with everything running now.
https://bernhard.hensler.net/sftp-yosemite-server/