Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

SOLVED NFS sharing / Export options

Status
Not open for further replies.

s25a

Member
Joined
Jan 16, 2016
Messages
76
Hi,

I am quite new to Freenas in regards to NFS and sharing. My goal is to setup a shared folder which is used for TV Recordings.

Before Freenas I used a QNAP NAS and it worked quite well there. The export file looks like:


Code:
cat /etc/exports
"/share/MD0_DATA/recordings" *(rw,async,no_subtree_check,insecure,no_root_squash


So I wanted to do that also on my Freenas with the same options however I do not find anything similar. Of course I could just paste the line in the exports file but I guess this is not the right way to do as it will be overwritten by the system, right?
The issue I have is that after creating the SHARE on Freenas it looks like:

Code:
nas# cat /etc/exports
/mnt/LPS/aufnahmen -mapall="media"


whereas media is the owner of the dataset with all permissions on it.
This unfortunately does not work - my Dreambox can access the share but it's not possible to write on this though everything in the permissions is set on read/write.
Any ideas? I guess I need the additional options like: rw,async,no_subtree_check,insecure,no_root_squash

Thanks S

screenshot.4.jpg
 

KrisBee

Neophyte Sage
Joined
Mar 20, 2017
Messages
1,219
I never used them, but QNAP & Dreambox are both Linux based whereas FreeNAS is based on FreeBSD. So you need to workout how to set up the equivalent NFS export in FrreNAS.

There are two halves to this - setting up the NFS service in FreeNAS and then the NFS share itself. Consult the user guide.

Your QNAP export looks to be using NFSv3 and "no_root_squash" equates to a NFS share where the "maproot user" = "root" & the "maproot group" = "wheel" in FreeNAS.

Check the owner and permissions of your QNAP share so see what to set in FreeNAS.
 

Chris Moore

Wizened Sage
Joined
May 2, 2015
Messages
10,055
whereas media is the owner of the dataset with all permissions on it.
This unfortunately does not work - my Dreambox can access the share but it's not possible to write on this though everything in the permissions is set on read/write.
Any ideas? I guess I need the additional options like: rw,async,no_subtree_check,insecure,no_root_squash
You have to configure the export settings in the GUI here: http://doc.freenas.org/11/sharing.html#unix-nfs-shares
but you also need to set the permissions on the dataset: http://doc.freenas.org/11/storage.html#change-permissions
If you share the dataset, but don't have the permissions set accordingly, you will not be able to access it.
 

s25a

Member
Joined
Jan 16, 2016
Messages
76
Hi,

thanks a lot for for giving all this information. Sorry for my late reply but I did a lot more testing and I have found out a few things that might help to solve it.

1) It's obviously not the Sharing that goes wrong. That does work. It does not matted if I use the owner of the dataset (media/media in my case) or do "no_root_squash" like described by KR.
2) The issue that exists is the permission on the data set. Please have a look at the screenshot attached: There you can see that Owner/Group have full access whereas other have no write access. So what I did is I set full access to Others as well (also applied the permissions recursively) and then saved. However when I then go back in the settings - again no write access for "Other". O
3) I crested a new test data set / Shared via NFS and set Full access for all and Voila this works and I could use it as a share for my dreambox.

So the problem is as said not the sharing it's the dataset permission. I am not sure why I can't activate full access on this Dataset. Any ideas?
As there's a huge amount of Datab below I cannot simply destroy and re-setup. It would cost me days to restore that Data from my backup.

Thanks S

screenshot.1.jpg
 

s25a

Member
Joined
Jan 16, 2016
Messages
76
Hi,

I found the solution: The Problem was that chmod did not work due to ACL. I had to correct with this line and set permissions again...Now it works :)

Code:
find /mnt/LPS/Videos/ \( -type d -or -type f \) -exec setfacl -b {} +


Thanks again

S
 
Status
Not open for further replies.
Top