i wonder, why the version i installed on a fresh Gentoo installation was built with EC enabled... but that is not important.
Concerning permissions: typically, after installation the following should happen:
- create a special user for naviserver (such as nsadmin),
- change permissions on naviserver log file accordingly,
- start naviserver with the flags "-u nsadmin -g nsadmin"
The path of the pid-file might come from the configuration, so make sure, that the path is correct in the config-file you are using. I just noticed that the sample config file "nsd-config.tcl" has actually an incorrect pidfile entry, in case you are using this, just comment that line.
Here is what i get, ... up to the the loading of nscp on Genoo
gentoo # groupadd nsadmin
gentoo # useradd -g nsadmin nsadmin
gentoo # chown -R nsadmin:nsadmin /usr/local/ns/logs
gentoo # /usr/local/ns/bin/nsd -u nsadmin -t /usr/local/ns/conf/nsd-config.tcl -f
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: OpenSSL 1.0.2o 27 Mar 2018 initialized
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: binder: started
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: nsmain: enable progress statistics for uploads >= 1048576 bytes
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: nsmain: NaviServer/4.99.17d2 starting
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: nsmain: security info: uid=1001, euid=1001, gid=1001, egid=1001
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: nsmain: Tcl version: 8.6.8
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: nsmain: max files: soft limit 4096, hard limit 4096
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Warning: nsmain: rl_cur (4096) > FD_SETSIZE (1024), select() calls should not be used
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: pool default: queueLength 0 low water 0 high water 0
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: nsd/init.tcl[default]: booting virtual server: tcl system encoding: "utf-8"
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: modload: loading module nscp from file nscp.so
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: nscp[default]: listening on [0.0.0.0]:4080
[18/Jun/2018:04:36:01][6324.7fb689055740][-main-] Notice: nscp[default]: added user: ""
...
So, i see no problems with the nscp module (see last two lines). Can it be that you have a leftover of nscp from earlier attempts?
Make sure to run "make install" from the naviserver source directory to install all modules.
As you are installing manually, i would as well recommend to install nsf
gentoo # emerge --ask dev-vcs/git
gentoo # cd /usr/local/src
gentoo # git clone git://alice.wu-wien.ac.at/nsf
gentoo # cd nsf
gentoo # ./configure --prefix=/usr/local/ns
gentoo # make install