NFS shares not working properly in Windows?

Status
Not open for further replies.

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
Hi,

I just finished recently building my FreeNAS box. :)
While using the current release (8.0) with NFS shares, everything works great in Linux (obviously). However, I encountered a strange issue related to permissions in Windows.

To enable the NFS client in Windows, all you have to do is:
1. Control Panel > Uninstall a program > Turn Windows features on or off
2. Check the "Client for NFS" box, under Service for NFS

I can map successfully the drive to an existing dir (192.168.1.5:/media) and I can create directories inside with no issues. However, I cannot create any files... I get a permission denied message, while the file is created as a 0Kb file. Once the empty file created, I can delete it with no issues. You will probably suggest me to create a CIFS/SMB share but I'm not interested to do this. In Ubuntu, you can use fine the NFS shares in Windows so it must be some minor bug in FreeNAS. That makes me believe this is a permission issue that might of been fixed into 8.0.1 Beta.

I was wondering if you could share some knowledge in that area and let me know if you found a fix.
 

Darkaine

Explorer
Joined
Jul 26, 2011
Messages
52
Its probably best to use CIFS. In fact I didn't even know the NFS client would work for windows. However since you don't want to go that route, how are your permissions set up in the drives? That's what got me right away, but I'm puzzled as to why you'd be able to create directories if you didn't have file permissions. So its likely that's not it (from my experience, which isn't much when it comes to servers).
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
I enabled all perms, all boxes are ticked for all users.
I remember there was something posted into Beta news related to this issue... I was wondering if anyone could test Beta4 NFS share and see if it's fixed in Windows? There an interesting tweak I found related to user permissions in Windows. I cannot try it because I don't have my NAS fully setup (waiting for 8.0.1 release that solves the ZFS issues with my WD20EARS disks). Can you let me know if the fix works for you in Beta4? Thanks guys.

I plan to update my USB stick with a clean install when 8.0.1 is released, it is a pain to physically insert the drive. :)

15e9xjs.png
 

Darkaine

Explorer
Joined
Jul 26, 2011
Messages
52
I can't test NFS Shares right now, but I can when I get home.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
TECH, what version of Windows are you using. I don't see this feature in Windows 7 Home Premium.
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
I can't test NFS Shares right now, but I can when I get home.
Thanks, much appreciated. Set both AnonymousUid and AnonymousGid to 0, that is the equivalent to Root user.

Hmm actually I just looked at the Admin Tools and there is a ton of information there... do this: Install the admin tools, then in Administrative Settings click on Services for NFS. Once the window is open, click on Client for NFS title, it will open a help guide with zillions of features and settings. I'm digging through it as we speak...
Still the easiest way to deal with perms is to use the registry edit hack related to AnonymousUid and AnonymousGid.

Let me know if it worked, it will be awesome to skip the crippled SMB shares and deal with a clean NFS connection only. Less services used with NAS = better.

TECH, what version of Windows are you using. I don't see this feature in Windows 7 Home Premium.
NFS client is available for Windows 7 Enterprise and Ultimate, unfortunately.
 

Darkaine

Explorer
Joined
Jul 26, 2011
Messages
52
Of course, I would be able to if my primary desktop wasn't having a blonde moment (No offense). lol I'll get it tested soon I promise. My main computer has Windows 7 Ultimate SP1 and Windows XP Pro SP3. This machine only has XP Pro SP3. I'll test in both however.
 

Cosmin

Cadet
Joined
Aug 18, 2011
Messages
9
nfs share problem

Hi, i´ve had same problem. It was kinda solved (after some research) with following command on windows machine (open a command line and type):

mount -o nolock -u:user -p:password IP_address:/mnt/mountpoint z:

I had to specify the user because if i force mapuser in share i get permission issues (i use same mountpoint with ftp and can't access files uploaded there), but otherwise the -o nolock should do the trick.
My current problem is that after a restart i can`t access the z: drive (but it exists)!
I must issue a umount -a command and then again the mount command... but since i don´t restart so often i can live with that.
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
Personally, I did not used the -u:user -p:password command, instead I added an anonymous GID and UID into registry.
If the locking is set to yes, it does not work:
Code:
mount -o nolock 192.168.1.6:/mnt/nas/media Z:

Local    Remote                                 Properties
--------------------------------------------------------------------------
Z:       \\192.168.1.6\mnt\nas\media            UID=0, GID=0
                                                rsize=32768, wsize=32768
                                                mount=soft, timeout=0.8
                                                retry=1, locking=no
                                                fileaccess=755, lang=ANSI
                                                casesensitive=no
                                                sec=sys


I have the same issue, if I reboot creepy Windoze, the mount becomes unavailable. As usual, everything works perfect on my Nix boxes.
 
Joined
Sep 28, 2011
Messages
8
I had the exact same issues with NFS. I also think that the NFS client in Windows is "slow". Whenever I selected a NFS share it would take from 5-15 seconds for Windows Explorer to show me the content of the share. Using the build-in file browser in FileZilla didn't give me this delay (sadly I will not start using FileZilla as my primary file explorer).

I reverted to CIFS shares and everything worked as expected. Getting almost 10mb/sec. using CIFS is OK for me on a 100 mbit network. NFS was somehow slower coming in around 7-9 mb/sec.

Regarding the slow speed you are experiencing have you tested the performance of the harddrives etc. Maybe they are not as fast as you would like. Have you tested the speed over FTP?
 
Status
Not open for further replies.
Top