# NSF File Permission Denied



## John Wright (Mar 13, 2017)

Ok, I know there have be several posts on similar issues, but none that address this issue.  I have posted to the Nas4Free board and they recommended I post it here as it most probably is a FreeBSD issue.

So, here goes.

I have several NSF shares on the NAS4Free server.  Here is the exports file.

```
/mnt/Media/camera -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Media/Photos -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Media/Music -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Media/Movies -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Files/Sheri -alldirs -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Files/NewJohn -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Files/John/FileCab1 -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Files/John/Documents -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Files/John/Applications -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Files/John -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Files/CalLib -mapall=root -network 192.168.10.0 -mask 255.255.255.0
/mnt/Files/Business -mapall=root -network 192.168.10.0 -mask 255.255.255.0
```
This file is generated by NAS4Free.  Here is the result of the `showmount -e localhost`

```
/mnt/Media/Photos                  192.168.10.0 
/mnt/Media/Music                   192.168.10.0 
/mnt/Media/Movies                  192.168.10.0 
/mnt/Media/camera                  192.168.10.0 
/mnt/Files/Sheri                   192.168.10.0 
/mnt/Files/John/FileCab1           192.168.10.0 
/mnt/Files/Business                192.168.10.0 
/mnt/Files/NewJohn                 192.168.10.0
```
Notice that CalLib, Documents, and Applications are all missing.  I can mount all the directories that are being exported no problem.  So the question is why are those three not being exported?  I have checked privileges, ownership and about everything else I can think of all with no success.

I am really in a quandary and hope someone here is a lot smarter than me and can point me in the right direction.

Thanks.


----------



## usdmatt (Mar 13, 2017)

Is anything logged to /var/log/messages when you restart mountd?


----------



## John Wright (Mar 13, 2017)

There is no messages file.  But the system.log file contains the following items:

```
Mar 13 18:06:53 nas4free mountd[1949]: can't change attributes for /mnt/Files/John/Documents: Invalid radix node head, rn: 0 0xfffff8001e6ced00
Mar 13 18:06:53 nas4free mountd[1949]: bad exports list line /mnt/Files/John/Documents -mapall
Mar 13 18:06:53 nas4free mountd[1949]: can't change attributes for /mnt/Files/John/Applications: Invalid radix node head, rn: 0 0xfffff8001e6ced00
Mar 13 18:06:53 nas4free mountd[1949]: bad exports list line /mnt/Files/John/Applications -mapall
Mar 13 18:06:53 nas4free mountd[1949]: can't change attributes for /mnt/Files/John: Invalid radix node head, rn: 0 0xfffff8001e6ced00
Mar 13 18:06:53 nas4free mountd[1949]: bad exports list line /mnt/Files/John -mapall
Mar 13 18:06:53 nas4free mountd[1949]: can't change attributes for /mnt/Files/CalLib: Invalid radix node head, rn: 0 0xfffff8001e6ced00
Mar 13 18:06:53 nas4free mountd[1949]: bad exports list line /mnt/Files/CalLib -mapall
```
But not totally sure what they mean.  It is obvious that the problems involve the -mapall switch.  But the other files have the same switch and export fine.  So any help greatly appreciated.


----------



## John Wright (Mar 14, 2017)

Ok,  So I think I have it figured out.  The error codes sent me on a different search direction.  It seems (and I should have known this) you can export file systems but not directories which is what I was trying to do.  So I was able to export one of the directories but the rest in the same file system failed.  Here's what I did, I exported the high level file system, then created links to the directories I need.  Works like a charm.
By the way, here is the result of a df command:

```
Files                          557G     39G    518G     7%    /mnt/Files
Files/Business                 525G    7.0G    518G     1%    /mnt/Files/Business
Files/John                     1.6T    1.1T    518G    69%    /mnt/Files/John
Files/Sheri                    599G     80G    518G    13%    /mnt/Files/Sheri
Media                          1.6T    534M    1.6T     0%    /mnt/Media
Media/Movies                   1.7T     98G    1.6T     6%    /mnt/Media/Movies
Media/Music                    1.6T     11G    1.6T     1%    /mnt/Media/Music
Media/Photos                   1.6T     43G    1.6T     3%    /mnt/Media/Photos
```
So I exported the /mnt/Files/John which has the files/directories I needed.


----------

