in 2023, how do I mount Windows 11 network shares on FreeBSD 13.2 ?

I cannot seem to find a way to mount a windows 11 network share on FreeBSD 13.2.

a) I tried "Gigolo". I can locate my share, and it then shows up in Thunar.
However, no command line apps can see the share, and I cannot 'CD' to to it from a terminal prompt.
I cannot figure out how to 'mount it'
(fusefs kernen module is loaded and system ctl allowing users to mount is set to 1).

Simply trying to execute from command line

gio mount //<IpAddress>/<share>
gives me back: gio: smb:// myIP/myShare: volume doesn’t implement mount


b) I have installed samba tools v4, so the the
smbclient can successfully login into the share, however there is no way to mount the share with smbclient


c) I tried using smbnetfs (that underneath uses fusefs).
that let's me create a local ~/usr01/mnt directory
and I can then do 'cd ~/usr01/mnt/<IpAddress>/<share>

that works. However none of my GUI programs or even MidnightCommander can see the
~/usr01/mnt/<IpAddress>/<share>



I am at loss of how to get this to work fully, on every reboot, from both CL and GUI programs

is there a way?
 
It's 2023 - why do people even use Windows anymore? (Gamers does not need to reply, we know you are addicted to your gaming fix)
 
none of my GUI programs or even MidnightCommander can see
are you setting correct uid/gid permissions when issuing the mount command? If everything is listed as owned by "root" when using ls -l, that might be the root cause.

The smbfs kernel level driver is unfortunately incredibly old. We are working on getting this updated in the Enterprise Working Group, however this may take a while until it really lands in base.
 
are you setting correct uid/gid permissions when issuing the mount command? If everything is listed as owned by "root" when using ls -l, that might be the root cause.

The smbfs kernel level driver is unfortunately incredibly old. We are working on getting this updated in the Enterprise Working Group, however this may take a while until it really lands in base.

cmoerz
Since mount_smbfs has not been working for a while (as it does not support v2 or v3 protocol versions), I have been trying to use smbnetfs


I set up my ~/.smb/smbnetfs.config
then I just do

$ smbnetfs ~/mountpoint/300g/

then

cd ~/mountpoint/300g/<myIP>/<mySharename>

works great. I can create files, read files and directories, etc.
--

Following your suggestion to check permissions, I can see the files there also have correct user permissions (of the use that created those files).

--
What is breaking everything -- is that using smbnetfs seems to work *ONLY*
from the CLI session that executed:


cd ~/mountpoint/300g/<myIP>/<mySharename>


*and* ability to browse files that directory works only for certain programs

For example: emacs -nw file.txt works
vscode file.txt works
mc . (invoking Midnight Commander in the current directory) does not work (does not see a file)

starting vscode from another xterm session and then just doing 'Open file'
and trying to navigate to
~/mountpoint/300g/<myIP>/<mySharename>
- does not work
trying to navigate like that with Emacs -- started from another xterm -- also does not work.


So it is like this magic of:

cd ~/mountpoint/300g/<myIP>/<mySharename>

creates a 'local' terminal session specific mount point context, that's not visible to a any other sessions (and to some programs like Midnight commander).

This why I was trying to use the

gio mount ..
to force FreeBSD gvfs to mount the remote share 'permanently', but that error out, as I noted above.

All I want is just a normal mounted share that I can read/write to from everywhere.

The share has to be (in my situation) exported from a Windows 11 host, and I need to mount in on FreeBSD 13.2.
 
I mount my nfs fileshares in fstab with failok set..
Phishfry
What facility (windows service) do you use on your windows 11 (not server version, just Windows 11 home or professional) to export Windows directories as NFS shares?

Typical windows 11 comes with NFS client, but not NFS server software.
 
It's 2023 - why do people even use Windows anymore? (Gamers does not need to reply, we know you are addicted to your gaming fix)
My Android mobile app development is hosted on Windows (and occasionally on Linux), I prefer to develop my backend portion of the system on FreeBSD (or other BSDs for that matter).
But in general Windows env is certainly a big part of my workflow and I want to have transparent file access across the environments. I am sure I was not alone in this quest, so thought it would benefit to ask knowledgeable folks on this forum

Hope this is ok.

Android development (is not supported on FreeBSD) (full Android SDK, emulators, etc).

My question, certainly was not meant to elicit discussion on why users use Windows (I am sure there are separate threads/topics on this), but since you asked, just wanted to provide you with additional context.
 
I'll attempt to summarize without needless Microsoft bashing. There's no reason to particularly hate SMB, it's an adequate network file system in recent versions depending on the scenario, and NFS on the other hand is far from being "perfect" either. The objective situation is simple, NFS is the native network file system on (most?) unix-like systems, SMB is the native one on Windows. Apple had their own native one as well, but gradually moved towards SMB. So, connecting different systems, one end will need to use the filesystem of the "foreign" system.

Looking at FreeBSD now, client-side SMB support is weak. smbfs(5) is unusable in practice for only supporting SMBv1, which should never be used for security reasons. Therefore, if you need SMB client functionality, you must use some 3rd-party implementation based on fusefs(5). The unfortunate reality is that the available solutions here all have drawbacks that might even be blockers depending on your scenario (they certainly were for me, wanting to share home directories usable on different client systems). Here's a short summary of the situation in the wiki: https://wiki.freebsd.org/MateuszPiotrowski/AccessingSmbSharesWithSambaClient (at the bottom, "Research"). I personally solved it by sharing my volumes twice, via NFS and also via SMB using a jail running samba.

Now, if the machine offering the shares must be Windows, I'd probably rather look into server-side NFS implementations for Windows. At the moment, this seems to be more likely to give you an acceptable overall result than client-side SMB on FreeBSD.
 
@zirias Thank you for the summary.
With regards to
>"Now, if the machine offering the shares must be Windows, I'd probably rather look into server-side NFS implementations for Windows. At the moment, this seems to be more likely to give you an acceptable overall result than client-side SMB on FreeBSD..."

Is there an free NFS server for windows that you would recommend?
(
I tried WinNFSD (last updated 2005), it comes up but seems to listen on a wrong network interface (and I cannot change it), I was not able to connect to it from my FreeBSD box.
)
 
Oh, Windows 10 and 11 also have an NFS server. But I do believe it's only available on the Pro and Enterprise versions, not on Home.
 
Typical windows 11 comes with NFS client, but not NFS server software.
I don't i was just looking at the literature. I guess Windows Server has the NFS server.

Anyway NFS Client should do it right? Setup a NFS Fileserver using FreeBSD. I have several hot and cold. Big and Small
 
Setup a NFS Fileserver using FreeBSD.
Other way around. The share (NFS or CIFS/SMB) is on the Windows machine. Especially CIFS/SMB is problematic because mount_smbfs(8) only supports SMBv1. That's the crux of the issue.

The other way around is not a problem, you can set up a Samba share with SMBv2 or SMBv3 on FreeBSD and Windows will happily connect to it.
 
SirDice
Windows 11/10 Pro (not Windows Server) do not have NFS server service built-in, only NFS client.
There are shareware/commercial NFS servers.

--


Phishfry fry , as SirDice noted, the network shares are serviced by Windows host (not Freebsd host), I need to mount the windows shares.
smbnetfs comes close, but it is not letting me 'mount', I can access (vi/emacs) files on the share to read and write, but I cannot navigate to those files from, say a GUI program, that wants to use normal file system navigation APIs.
 
Set up a Linux VM, SMB mount the share in there, NFS export that mountpoint from Linux and mount in the FreeBSD host.

I wish somebody made some SMB client for FUSE.
 
I wish somebody made some SMB client for FUSE.
At least two implementations exist, but they have their own set of issues. I rather wish somebody would rewrite smbfs(5) to finally support SMB3. 😉

Until that may happen some day, the sanest way is to go for NFS instead. Or, if that's really not possible in your scenario, use some other OS for your client :(

Is there an free NFS server for windows that you would recommend?
Can't help with that, sorry, I never needed it. My fileserver is FreeBSD anyways (offering both NFS and SMB), and my only Windows installations are server editions...
 
Back
Top