SOLVED Help Needed - NFS Permissions & Sharing

MEC-777

Dabbler
Joined
Mar 21, 2019
Messages
12
Hi there, I'm new to FreeNAS and networking in-general, and I need some help.

I have a new NAS machine I recently setup. Full specs can be found here. Created a pool with an NFS directory and now I'm trying to figure out how to allow that directory to automatically mount on my devices (PCs connected to the local home network) on boot-up, without having to mount it manually in terminal every time.

I created an entry in the /etc/fstab config file for the directory and on start-up the directory does show up now under the file manager, but I get a message upon trying to access it saying it cannot mount as it requires root access to do so. I have tried changing the user/group settings and permissions, but I still get the same message. I've spent several hours reading and watching videos, trying to understand what I need to do or change in these settings, to make the directory accessible without requiring root, but I just don't quite understand.

If anyone can help or has any suggestions, I'm all ears. All devices I want to give access to are running Linux.

Thanks in advance.
 

MEC-777

Dabbler
Joined
Mar 21, 2019
Messages
12

Glorious1

Guru
Joined
Nov 23, 2014
Messages
1,210
I don't have a linux pc, but I do have NFS shares on FreeNAS that I access from my macs. Maybe it works similarly on linux. You just mount the network drive/share manually, then open your user/login items settings, and drag the disk icon in to that pane. Then it opens when you log in.
 

John Doe

Guru
Joined
Aug 16, 2011
Messages
635
have you tried with systemd?
/etc/fstab

Code:
# <file system>           <dir>             <type>   <options>                  <dump> <pass>
192.168.1.10:/Multimedia  /media/Qnap-Media  nfs     x-systemd.automount,noauto    0      0


nfs v3 should not require any permission. it is tcp/ip based access control, if i am not wrong.
So I assume permission issue is on client.
 

MEC-777

Dabbler
Joined
Mar 21, 2019
Messages
12
have you tried with systemd?
/etc/fstab

nfs v3 should not require any permission. it is tcp/IP based access control, if i am not wrong.
So I assume permission issue is on client.

Thanks for the reply.

This is my current entry in /etc/fstab

Code:
(IP address):/mnt/Pool1/nfs_share1/mnt  /media/freenas/ nfs    x-systemd.automount,noauto  0 0


When I reboot the system and try to open the nfs share directory it shows the following message:

Code:
An error occurred while accessing 'mnt/Pool1/nfs_share1/mnt on (IP address)', the system responded: mount: /media/freenas/: operation permitted for root only.
 
Last edited:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@MEC-777 Which linux distro are you using? What is the output of cat /etc/exports on your FreeNAS box?
 

MEC-777

Dabbler
Joined
Mar 21, 2019
Messages
12
@MEC-777 Which linux distro are you using? What is the output of cat /etc/exports on your FreeNAS box?

Running Manjaro 18 and Mint 19 on client devices.

Output of cat /etc/exports is:
Code:
/mnt/Pool1/nfs_share -alldirs -mapall="root"
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Don't have either Manjaro 18 or Mint 19 in use. Assuming /mnt/Pool1/nfs_share1/mnt really is a directory and not the mountpoint of a nested dataset then your FreeNas nfs export looks OK. You could be using nfsv4 with "NFSv3 ownership model for NFSv4" on FrreNAS rather than nfsv3.

Is your NFS export mountable from the CLi, e.g. mount -v -t nfs <freenas ip>://mnt/Pool1/nfs_share1/mnt /media/freenas/?

Not necessarily related, but your hardware specs are a concern. Consumer m/board, non-ECC RAM less than 4GB RAM are all far from ideal. Also you mention, "The motherboard I had lying around and has the RAID support I needed. The G4400 was cheap and does the job just fine ....". The zfs file system abhors hardware/fake hardware RAID. Hopefully you've set your system to use the SATA ports in AHCI mode.
 

MEC-777

Dabbler
Joined
Mar 21, 2019
Messages
12
Got it sorted. Thanks for the replies. :)

Had to make the changes to /etc/fstab as root (sudo -i), not just sudo.

I then mounted the nfs share manually in CLI and ran the following:
trail -1 /etc/mtab
trail -1 /etc/mtab >> /etc/fstab


It now auto mounts the nfs on boot and I have access.
 
Top