unable to create NFS share

758 views
Skip to first unread message

Bberu Bberu

unread,
Nov 1, 2017, 4:07:55 AM11/1/17
to Alt-F
Hello

I'm trying to create NFS shares from Alt-f 1.0 but struggles with some issues in the Service -> Network -> nfs configuration

each time I try creating a share, I end-up with this message :


nfs_proc.cgi: line 67: can't create /etc/exports: nonexistent directory
nfs_proc.cgi: line 67: can't create /etc/exports: nonexistent directory
HTTP/1.1 303
Content-Type: text/html; charset=UTF-8
Location: /cgi-bin/nfs.cgi


Allowed Hosts : *
Export Options : w,no_root_squash,no_subtree_check,anonuid=99,anongid=98

creating an exports file or directory in /etc does not help....

Same shares using Samba works fine

any thoughts ?

Bruno

João Cardoso

unread,
Nov 1, 2017, 11:04:53 AM11/1/17
to Alt-F


On Wednesday, 1 November 2017 08:07:55 UTC, Bberu Bberu wrote:
Hello

I'm trying to create NFS shares from Alt-f 1.0 but struggles with some issues in the Service -> Network -> nfs configuration

each time I try creating a share, I end-up with this message :


nfs_proc.cgi: line 67: can't create /etc/exports: nonexistent directory
nfs_proc.cgi: line 67: can't create /etc/exports: nonexistent directory
HTTP/1.1 303
Content-Type: text/html; charset=UTF-8
Location: /cgi-bin/nfs.cgi


Allowed Hosts : *
Export Options : w,no_root_squash,no_subtree_check,anonuid=99,anongid=98

 
I can't reproduce that. The /etc/exports file is created if it doesn't not exists. *if* the /etc folder exists.

From the command line you can see that:

[root@DNS-320L]# echo foo > /foo/exports
/bin/sh: can't create /foo/exports: nonexistent directory

So it seems that you don't have a /etc folder

creating an exports file or directory in /etc does not help....

If a /etc/exports directory is manually created, I then get the error:

nfs_proc.cgi: line 67: can't create /etc/exports: Is a directory
nfs_proc.cgi: line 67: can't create /etc/exports: Is a directory
HTTP/1.1 303
Content-Type: text/html; charset=UTF-8
Location: /cgi-bin/nfs.cgi
 
So I can't help.

Have you using the command line? manipulating anything under the /Alt-F folder? Is it a new install, and upgrade from a previous Alt-F release?
If there are any stray files from a previous Alt-F install you can try to fix that by using the "fixup clean' command.

Bberu Bberu

unread,
Nov 1, 2017, 1:10:50 PM11/1/17
to Alt-F


Le mercredi 1 novembre 2017 16:04:53 UTC+1, João Cardoso a écrit :


On Wednesday, 1 November 2017 08:07:55 UTC, Bberu Bberu wrote:
Hello

I'm trying to create NFS shares from Alt-f 1.0 but struggles with some issues in the Service -> Network -> nfs configuration

each time I try creating a share, I end-up with this message :


nfs_proc.cgi: line 67: can't create /etc/exports: nonexistent directory
nfs_proc.cgi: line 67: can't create /etc/exports: nonexistent directory
HTTP/1.1 303
Content-Type: text/html; charset=UTF-8
Location: /cgi-bin/nfs.cgi


Allowed Hosts : *
Export Options : w,no_root_squash,no_subtree_check,anonuid=99,anongid=98

 
I can't reproduce that. The /etc/exports file is created if it doesn't not exists. *if* the /etc folder exists.

From the command line you can see that:

[root@DNS-320L]# echo foo > /foo/exports
/bin/sh: can't create /foo/exports: nonexistent directory

So it seems that you don't have a /etc folder

Thank you for answering me.
I have one /etc folder, under /mnt/md0/Alt-F :

Up Folder
etc root users
rwxrwsrwx
usr root users rwxrwsrwx
var root users
rwxrwsrwx
.wh..wh.orph  root users rwxrwsrwx
.wh..wh.plnk  root users 
rwxrwsrwx
 
unless it is not the correct one ?


creating an exports file or directory in /etc does not help....

If a /etc/exports directory is manually created, I then get the error:

nfs_proc.cgi: line 67: can't create /etc/exports: Is a directory
nfs_proc.cgi: line 67: can't create /etc/exports: Is a directory
HTTP/1.1 303
Content-Type: text/html; charset=UTF-8
Location: /cgi-bin/nfs.cgi
 
So I can't help.

I have the exact same error when creating one
 
Have you using the command line? manipulating anything under the /Alt-F folder? Is it a new install, and upgrade from a previous Alt-F release?
If there are any stray files from a previous Alt-F install you can try to fix that by using the "fixup clean' command.


I don't know how to use the command line (my usage of alt-F is quite basic)
I made an update from RC4

João Cardoso

unread,
Nov 1, 2017, 3:20:40 PM11/1/17
to Alt-F


On Wednesday, 1 November 2017 17:10:50 UTC, Bberu Bberu wrote:


Le mercredi 1 novembre 2017 16:04:53 UTC+1, João Cardoso a écrit :


On Wednesday, 1 November 2017 08:07:55 UTC, Bberu Bberu wrote:
Hello

I'm trying to create NFS shares from Alt-f 1.0 but struggles with some issues in the Service -> Network -> nfs configuration

each time I try creating a share, I end-up with this message :


nfs_proc.cgi: line 67: can't create /etc/exports: nonexistent directory
nfs_proc.cgi: line 67: can't create /etc/exports: nonexistent directory
HTTP/1.1 303
Content-Type: text/html; charset=UTF-8
Location: /cgi-bin/nfs.cgi


Allowed Hosts : *
Export Options : w,no_root_squash,no_subtree_check,anonuid=99,anongid=98

 
I can't reproduce that. The /etc/exports file is created if it doesn't not exists. *if* the /etc folder exists.

From the command line you can see that:

[root@DNS-320L]# echo foo > /foo/exports
/bin/sh: can't create /foo/exports: nonexistent directory

So it seems that you don't have a /etc folder

Thank you for answering me.
I have one /etc folder, under /mnt/md0/Alt-F :
 
That is OK, but you should not manipulate the Alt-F folder  directly. I have fixed the webUI to disable that possibility.

As you have not used the command line to "fiddle" around, your issues must come from somewhere else, don't know where from.
Let's start by ignoring that error and just try to start the NFS service, even if not configured: Services->Network,nfs,StartNow. If it is already started, stop it, then start it again. Please post any error or warning message. Verify that/if it continues running after a while.
By default that will export all filesystems and create a simple /etc/export file.
If it starts without errors or warnings and keeps running, try configuring it. Any difference?

Bberu Bberu

unread,
Nov 2, 2017, 12:48:15 AM11/2/17
to Alt-F
Hello,

I started the nfs (without configuring it) for 15 mn now
I cannot see a /etc/export directory till now
No error / log message. I displayed all the available logs but nothing strange from today (November 2nd)

In Services-> Network it still shows " Running" but using System->utilities->view logs->Running processes I cannot see any nfs related process (neithervacsmb one so may be it is not relevant)

By the way, I let SMB shares configured and running, hope this is not the problem ?

Bruno

Bberu Bberu

unread,
Nov 2, 2017, 1:06:50 AM11/2/17
to Alt-F
After rebooting, I checked the System Log and here what is written :

Nov 2 05:53:11 dns323 user.info kernel: RPC: Registered tcp NFSv4.1 backchannel transport module.
Nov 2 05:53:12 dns323 user.info kernel: Installing knfsd (copyright (C) 1996 ok...@monad.swb.de).
Nov 2 05:53:16 dns323 user.notice root: Creating default NFS exports file. Starting rpc.statd: Starting portmap: .OK. Starting sm-notify: OK. Starting rpc.statd: OK. OK. Starting rpc.mountd: OK. Starting rpc.nfsd: OK.
Nov 2 05:53:23 dns323 user.notice root: nfsd running

But still no /etc/export folder

Bruno

João Cardoso

unread,
Nov 2, 2017, 1:45:26 PM11/2/17
to Alt-F
And its better to attach the whole log, not only the part that you think that is relevant. Better trained eyes can see things what you miss.

So NFS is running, and the /etc/exports file should have been created if it does not exists, as the log says:

dns323 user.notice root: Creating default NFS exports file

 

But still no /etc/export folder


It is not a folder, it's a file.

And how have you checked that? You said that you don't use the command line. To use it, telnet or ssh the box as the 'root' user and using the same password as in the webUI, then issue the commands

ls -l /etc/exports
cat
/etc/exports
showmount -e # shows the list of exported filesystems

To clean possible leftovers from the previous fw, use System->Utilities,Fixes,RemoveAll

If still that doesn't solve your issue:
Have you installed any Alt-F packages being the ones shipped with the firmware? In case that you have manipulated the Alt-F folder and that is causing issues you may have to remove it, Packages->Alt-F,Packages Installed On, Delete. If you are not allowed to do that, uncheck the Boot Enable button, Submit and reboot. After reboot you can Delete it and reinstall fresh.

 

Bruno

Bberu Bberu

unread,
Nov 2, 2017, 2:46:59 PM11/2/17
to al...@googlegroups.com


Le jeudi 2 novembre 2017 18:45:26 UTC+1, João Cardoso a écrit :


On Thursday, 2 November 2017 05:06:50 UTC, Bberu Bberu wrote:
After rebooting, I checked the System Log and here what is written :

Nov  2 05:53:11 dns323 user.info kernel: RPC: Registered tcp NFSv4.1 backchannel transport module.
Nov  2 05:53:12 dns323 user.info kernel: Installing knfsd (copyright (C) 1996 ok...@monad.swb.de).
Nov  2 05:53:16 dns323 user.notice root: Creating default NFS exports file. Starting rpc.statd: Starting portmap: .OK. Starting sm-notify: OK. Starting rpc.statd: OK. OK. Starting rpc.mountd: OK. Starting rpc.nfsd: OK.
Nov  2 05:53:23 dns323 user.notice root: nfsd running


And its better to attach the whole log, not only the part that you think that is relevant. Better trained eyes can see things what you miss.

So NFS is running, and the /etc/exports file should have been created if it does not exists, as the log says:

dns323 user.notice root: Creating default NFS exports file


OK, thought this would be relevant / helpful. My bad.
Attached is the entire system log
 
 

But still no /etc/export folder


It is not a folder, it's a file.

And how have you checked that? You said that you don't use the command line. To use it, telnet or ssh the box as the 'root' user and using the same password as in the webUI, then issue the commands

ls -l /etc/exports
cat
/etc/exports
showmount -e # shows the list of exported filesystems


the first command shows :

[root@dns323]# ls -l /etc/exports
lrwxrwxrwx    1 root     root            16 Nov  2 19:35 /etc/exports -> /ffp/etc/exports

the second one :

[root@dns323]# cat /etc/exports
cat: can't open '/etc/exports': No such file or directory

the third one :

[root@dns323]# showmount -e
Export list for dns323:
[root@dns323]#
 
To clean possible leftovers from the previous fw, use System->Utilities,Fixes,RemoveAll

If still that doesn't solve your issue:
Have you installed any Alt-F packages being the ones shipped with the firmware? In case that you have manipulated the Alt-F folder and that is causing issues you may have to remove it, Packages->Alt-F,Packages Installed On, Delete. If you are not allowed to do that, uncheck the Boot Enable button, Submit and reboot. After reboot you can Delete it and reinstall fresh.

Done it, but still a link to ffp. That reminds me that (for a reason I cannot remember) I tried ffp packages a (long) time ago. But also removed them all (packages -> ffp -> uninstall) and now have none of them left (no ffp directory at root)

[root@dns323]# pwd
/
[root@dns323]# ls -l
total 37
lrwxrwxrwx    1 root     root            14 Nov  2 19:36 Alt-F -> /mnt/md0/Alt-F
-rw-r--r--    1 root     root         15122 Mar 18  2015 COPYING
-rw-r--r--    1 root     root           329 Jul 19 19:18 LICENSE
lrwxrwxrwx    1 root     root            15 Nov  2 19:35 Public -> /mnt/md0/Public
-rw-r--r--    1 root     users          111 Nov  2 19:36 README.txt
drwxr-xr-x    2 root     root           986 Oct 13 15:57 bin
drwxr-xr-x    2 root     root             3 Sep 22 21:07 boot
drwxr-xr-x    4 root     root          1620 Nov  2 19:35 dev
drwxr-xr-x   15 root     root          4096 Nov  2 19:36 etc
lrwxrwxrwx    1 root     root            14 Nov  2 19:35 home -> /mnt/md0/Users
-rwxr-xr-x    1 root     root          5343 Dec 20  2015 init
drwxr-xr-x    2 root     root           539 Oct 13 15:57 lib
drwxr-xr-x    5 root     root           100 Nov  2 19:35 mnt
dr-xr-xr-x   81 root     root             0 Jan  1  1970 proc
drwxr-x---    2 root     root            60 Nov  2 19:37 root
drwxrwxrwt    5 root     root           100 Jan  1  1970 rootmnt
drwxr-xr-x    2 root     root           580 Nov  2 19:35 sbin
dr-xr-xr-x   11 root     root             0 Jan  1  1970 sys
drwxrwxrwt   10 root     root           300 Nov  2 19:41 tmp
drwxr-xr-x   12 root     root          4096 Feb 21  2012 usr
drwxr-sr-x    3 root     users         4096 Nov  2 19:36 var
[root@dns323]#

I have currently:

No ffp instalation found.

Install ffp-0.5
Install ffp-0.7
from
into


log.txt

João Cardoso

unread,
Nov 2, 2017, 3:16:43 PM11/2/17
to Alt-F


On Thursday, 2 November 2017 18:46:59 UTC, Bberu Bberu wrote:


Le jeudi 2 novembre 2017 18:45:26 UTC+1, João Cardoso a écrit :


On Thursday, 2 November 2017 05:06:50 UTC, Bberu Bberu wrote:
After rebooting, I checked the System Log and here what is written :

Nov  2 05:53:11 dns323 user.info kernel: RPC: Registered tcp NFSv4.1 backchannel transport module.
Nov  2 05:53:12 dns323 user.info kernel: Installing knfsd (copyright (C) 1996 ok...@monad.swb.de).
Nov  2 05:53:16 dns323 user.notice root: Creating default NFS exports file. Starting rpc.statd: Starting portmap: .OK. Starting sm-notify: OK. Starting rpc.statd: OK. OK. Starting rpc.mountd: OK. Starting rpc.nfsd: OK.
Nov  2 05:53:23 dns323 user.notice root: nfsd running


And its better to attach the whole log, not only the part that you think that is relevant. Better trained eyes can see things what you miss.

So NFS is running, and the /etc/exports file should have been created if it does not exists, as the log says:

dns323 user.notice root: Creating default NFS exports file


OK, thought this would be relevant / helpful. My bad.
Attached is the entire system log
 
 

But still no /etc/export folder


It is not a folder, it's a file.

And how have you checked that? You said that you don't use the command line. To use it, telnet or ssh the box as the 'root' user and using the same password as in the webUI, then issue the commands

ls -l /etc/exports
cat
/etc/exports
showmount -e # shows the list of exported filesystems


the first command shows :

[root@dns323]# ls -l /etc/exports
lrwxrwxrwx    1 root     root            16 Nov  2 19:35 /etc/exports -> /ffp/etc/exports

OK. (not OK), just remove it, but first stop nfs:

rcnfs stop # stop nfs and nfs required services
rm
-f /etc/exports # remove stray exports
rcnfs start
# start nfs and nfs required services with default, all mounts, all allowed, permissions


Now the previous 'ls -l /etc/exports' and 'cat /etc/exports' should be different.
Can you now try the nfs Configure webUI and see if the error remains?

From the log, you have a small /mnt/sda4 filesystem, probably inherit from d-link fw. I recommend you (*after* solving the nfs issue) to install Alt-F on that filesystem, to isolate it from your data files (some install Alt-F on a USB pen):

From the log I also see that you have disabled the /mnt/md0/Alt-F install:

Alt-F directory found in md0 but not used, as file NOAUFS exists on it.

You can (*after* fixing the nfs issue!)

-reenable it
-or delete it and create a new on sda4, starting fresh, but only advisable if you have not installed further Alt-F packages, 
-or copy it to sda4. hmm, depends if the existing (and currently not used) is damage or not.
 
All done using the webUI, Packages->Alt-F

Bberu Bberu

unread,
Nov 2, 2017, 3:30:25 PM11/2/17
to Alt-F

Hi again !



the first command shows :

[root@dns323]# ls -l /etc/exports
lrwxrwxrwx    1 root     root            16 Nov  2 19:35 /etc/exports -> /ffp/etc/exports

OK. (not OK), just remove it, but first stop nfs:

rcnfs stop # stop nfs and nfs required services
rm
-f /etc/exports # remove stray exports
rcnfs start
# start nfs and nfs required services with default, all mounts, all allowed, permissions


Now the previous 'ls -l /etc/exports' and 'cat /etc/exports' should be different.

Indeed, this is far better :
[root@dns323]# ls -l /etc/exports
-rw-r--r--    1 root     root           248 Nov  2 20:23 /etc/exports
[root@dns323]# cat /etc/exports
/mnt/md0 192.168.1.0/24(rw,no_root_squash,no_subtree_check,anonuid=99,anongid=98)
/mnt/sda4 192.168.1.0/24(rw,no_root_squash,no_subtree_check,anonuid=99,anongid=98)
/mnt/sdb3 192.168.1.0/24(rw,no_root_squash,no_subtree_check,anonuid=99,anongid=98)

[root@dns323]# showmount -e
Export list for dns323:
/mnt/sdb3 192.168.1.0/24
/mnt/sda4 192.168.1.0/24
/mnt/md0  192.168.1.0/24
[root@dns323]#
 
Can you now try the nfs Configure webUI and see if the error remains?

No errors shown when submitting new configurations
 
From the log, you have a small /mnt/sda4 filesystem, probably inherit from d-link fw. I recommend you (*after* solving the nfs issue) to install Alt-F on that filesystem, to isolate it from your data files (some install Alt-F on a USB pen):
 
Yes, this one was left after going from d-link to alt-f

From the log I also see that you have disabled the /mnt/md0/Alt-F install:

Alt-F directory found in md0 but not used, as file NOAUFS exists on it.

You can (*after* fixing the nfs issue!)

-reenable it
-or delete it and create a new on sda4, starting fresh, but only advisable if you have not installed further Alt-F packages, 
-or copy it to sda4. hmm, depends if the existing (and currently not used) is damage or not.
 
All done using the webUI, Packages->Alt-F

This is odd as this message was the one shown when I applied  that part of your message (after rebooting and before re-installing the packages):
Have you installed any Alt-F packages being the ones shipped with the firmware? In case that you have manipulated the Alt-F folder and that is causing issues you may have to remove it, Packages->Alt-F,Packages Installed On, Delete. If you are not allowed to do that, uncheck the Boot Enable button, Submit and reboot. After reboot you can Delete it and reinstall fresh.

Regards
Bruno

João Cardoso

unread,
Nov 3, 2017, 2:52:22 PM11/3/17
to Alt-F
OK, so it is solved.

A dangling symlink was causing the issue. I make no ideia how it appeared.
 
 
From the log, you have a small /mnt/sda4 filesystem, probably inherit from d-link fw. I recommend you (*after* solving the nfs issue) to install Alt-F on that filesystem, to isolate it from your data files (some install Alt-F on a USB pen):
 
Yes, this one was left after going from d-link to alt-f

From the log I also see that you have disabled the /mnt/md0/Alt-F install:

Alt-F directory found in md0 but not used, as file NOAUFS exists on it.

You can (*after* fixing the nfs issue!)

-reenable it
-or delete it and create a new on sda4, starting fresh, but only advisable if you have not installed further Alt-F packages, 
-or copy it to sda4. hmm, depends if the existing (and currently not used) is damage or not.
 
All done using the webUI, Packages->Alt-F

This is odd as this message was the one shown when I applied  that part of your message (after rebooting and before re-installing the packages):
Have you installed any Alt-F packages being the ones shipped with the firmware? In case that you have manipulated the Alt-F folder and that is causing issues you may have to remove it, Packages->Alt-F,Packages Installed On, Delete. If you are not allowed to do that, uncheck the Boot Enable button, Submit and reboot. After reboot you can Delete it and reinstall fresh.

That was an indication for you follow if everything else failed. "If still that doesn't solve your issue:"

Doesn't matter, you can activate and boot enable the existing md0 location, or if you feel adventurous move it to the sda4 location and boot activate only it.


Regards
Bruno

Bberu Bberu

unread,
Nov 4, 2017, 9:30:22 AM11/4/17
to Alt-F
Hello

So it works, kindof let say at about 95%
I can see my shares, connect to them (I stopped the SMB shares and started the NFS ones alone)
I can access to files, create and delete, but not all files(from OS X El Capitan)

Some of them, usually entire directories are only "view-able". I can see them, navigate them, but not open files inside.
There is one for example I can enter and navigate but cannot open any of the files
If I copy its content in a newly created directory, I can open some files, but some others stay non-openable.

Those files / directories have the exact same authorisations (777 / own : root / group : users) as the ones working correctly.
I tried several NFS configurations (modifying the options in the configuration tab : all_squash with anonuid and anongid modified to fit either root or user), tried modifying the files rights (chmod, chown, touch,...)
Nothing worked.

So I think I'll stick with SMB even if this is less performant for video / photo access
Nevetheless, thanks for your help.
Bruno

João Cardoso

unread,
Nov 4, 2017, 11:48:39 AM11/4/17
to Alt-F


On Saturday, 4 November 2017 13:30:22 UTC, Bberu Bberu wrote:
Hello

So it works, kindof let say at about 95%
I can see my shares, connect to them (I stopped the SMB shares and started the NFS ones alone)


These are unrelated, both can be running simultaneously
 

I can access to files, create and delete, but not all files(from OS X El Capitan)


If you are on mac, you might try install netatalk (along with NFS and Samba), as it is "A AFP (Apple Filling Protocol) fileserver". Initial autentication is very slow.
 

Some of them, usually entire directories are only "view-able". I can see them, navigate them, but not open files inside.
There is one for example I can enter and navigate but cannot open any of the files
If I copy its content in a newly created directory, I can open some files, but some others stay non-openable.

Those files / directories have the exact same authorisations (777 / own : root / group : users) as the ones working correctly.
I tried several NFS configurations (modifying the options in the configuration tab : all_squash with anonuid and anongid modified to fit either root or user), tried modifying the files rights (chmod, chown, touch,...)
Nothing worked.


I make routine weekly backups using NFS with the default configuration without any issues. Alt-F uses NFSv3.

Bberu Bberu

unread,
Nov 4, 2017, 2:58:17 PM11/4/17
to Alt-F
Hi

I did not find the netatalk packages in the Packages -> Alt-f -> Stable
If you can tell me where to find it and have some read-me or instructions to use it, I can give it a shot

Regards
Bruno

Reply all
Reply to author
Forward
0 new messages