3 ms·
I want to use BSDs, and I tried using OpenBSD, for my servers, but there are far too many missing features I rely on from Linux. One simple example is mount --b
by serbuvlad 2y ago
I want to use BSDs, and I tried using OpenBSD, for my servers, but there are far too many missing features I rely on from Linux. One simple example is mount --bind. I want to allow some users to connect to my server via SFTP and put some files their $HOME/files which then goes to a physical disk used for user files. In Linux this is as simple as mount --bind /disk/userfiles/$USER /home/$USER/files. In OpenBSD they recommended using a localhost NFS share. That didn't seem to me like as good of a solution.
- deleted 2y ago[deleted]
- wahern 2y agoJust curious, why would symlinks not work here? That's traditionally how this sort of thing was done, even on Linux. Is it a chroot issue? Interestingly, OpenBSD services seem to be moving away from chroot now that it has unveil. (Not that that would help you here and now.)
- serbuvlad 2y ago> Is it a chroot issue? Yes. In my particular case I was setting up a server for some non-technical users to share files with me via FileZilla. So I use ChrootDirectory %h to restrict users to their home directory. Even if it wouldn't be a security issue to omit this, my users would be confused by seeing the whole /usr, /bin, /var etc. directory hierarchy show up in FileZilla. And even if they could learn their way around it, I don't want them to see the whole directory hierarchy. I just want them to see their own files. Granted, this could be solved by symlinks if SFTP provided a way other than chroot to change the user-perceived home directory. But the fact that mount --bind works across filesystem namespace changes makes it more robust and useful in my book.
- criticalfault 2y agoI didnt know what bind mount js, so I googled it. https://unix.stackexchange.com/questions/198590/what-is-a-bind-mount#198591 https://unix.stackexchange.com/questions/198590/what-is-a-bi... There is something here that might solve your problem: nullfs. Check the stack exchange link. I don't use bsd, so this is just me sharing what I found out.
- wahern 2y agoOpenBSD dropped nullfs a long time ago. See https://undeadly.org/cgi?action=article;sid=20050527155028 https://undeadly.org/cgi?action=article;sid=20050527155028 But it looks like DragonflyBSD, FreeBSD, and NetBSD have retained it.