File exchange between windows guest and jail

Hello, I need a shared folder between Windows (bhyve guest) and jail (on the same host).

What should I choose if I don't want to install additional software on the host itself (I suppose this mean no NFS as NFS never was jail friendly).

I have some proprietary windows software that uses IN and OUT folders for remote control.
Samba would be the obvious choice. Although I do remember there are some caveats with Samba running inside a jail but basic file sharing functionality should work.
I never used samba and it looks scary with it's DC functionality.
No need for all that. A basic server configuration will do just fine (it will function as a stand-alone Windows server).

Why there are so many sambas in port tree ?
Because we like choice :)

We started off with just one version, then new versions were released and the 'old' versions are still kept around because they're still supported versions and people may not be able (or don't want) to upgrade to the latest version.

For new installations I would recommend starting with the latest version: net/samba46.
I have an issue with samba. When I alter existing file on FreeBSD filesystem, changes are not reflected on Windows client. Seems like file content is cached. How can I overcome this problem? Samba is compiled with FAM option.
Depending on your actual purpose there exist other options too. E.g. I rarely need file exchange, so I let net/freerdp do the work, it can "map" a directory to Windows:
$ xfreerdp -grab-keyboard /bpp:24 /w:1800 /h:1200 /v:$HOST /u:$USER /p:$PWD /clipboard /drive:home,/home/$USERDIR /fonts /sound:sys:oss,dev:3 /microphone:sys:oss,format:1
Of course, you may not need all those options with sound etc., check the man page xfreerdp(1).
I need to organize file data exchange between daemon and windows program. daemon is writing a line into file, windows program is reading it.
Is the Windows client only reading? Have you considered using a basic nginx or lighttpd configuration to serve that file?
Is the Windows client only reading? Have you considered using a basic nginx or lighttpd configuration to serve that file?
No, it reads one file and logs result into another one. Daemon should read out file. I can choose existing folder and file names in application settings. Probably, I can copy files in and out using something like scp client for windows, but hey, it's a huge overcomplication. I can't believe that simple file sharing between unix and windows can be so dramatic.
If you have an Enterprise version of Windows, it supports NFS out of the box (you have to enable it though), works very well. If it's not Enterprise, there exist some third party NFS clients, e.g. FreeNFS.
Is NFS works on jail ? I remember rpcbind had issues, at least some time ago.
I asked penguin friend and he confirmed the issue under CentOS7 + Windows 8, but not with Windows 2003, so this is not FreeBSD only. I think samba options are not exhausted, I'll try to disable SMB2
I wrote my own implementation with sockets and integrated it into my daemon. It's not only faster, but also I have full error handling within daemon.
  • Thanks
Reactions: Oko