Forum OpenACS Q&A: Problem with Permission denied ns_log

Hey Any help is really appreciated !!

I've successfully installed AOL,POSTGRES

I just Un-tar the openacs-5.1.5 into /var

wat shud i do next ????? I didnot any give service_name for
it ?? wat is it ??? But i've edited Config.tcl accordingly with postgres and others

Whenever i start it using the Below command it throws
an error of permission denied of ns_log

Wat is da solution

I wud be delighted if any1 propose a solution for this..

I provide the below screen shot of wat i got ...

------------------------------------------------------------

[ddd@ethnet /]$ /usr/local/aolserver40r10/bin/nsd -ft
/var/openacs-5.1.5/etc/config.tcl

[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: nsd.tcl: starting to read config file...
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: nsd.tcl: using threadsafe tcl: 1
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: nsd.tcl: finished reading config file.
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: encoding: loaded: utf-8
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: nsmain: AOLserver/4.0.10 starting
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: nsmain: security info: uid=500, euid=500, gid=500, egid=500
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: nsmain: max files: FD_SETSIZE = 1024, rl_cur = 1024, rl_max = 1024
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Error: pidfile: failed to open pid file '/usr/local/aolserver/log/nspid.openacs-5.1.5': 'Permission denied'
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: adp[openacs-5.1.5]: mapped /*.adp
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: modload: loading '/usr/local/aolserver40r10/bin/nssock.so'
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Notice: modload: loading '/usr/local/aolserver40r10/bin/nslog.so'
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Error: nslog: error 'Permission denied' opening '/var/openacs-5.1.5/log/openacs-5.1.5.log'
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Error: modload: init /usr/local/aolserver40r10/bin/nslog.so of Ns_ModuleInit returned: -1
[29/Jun/2005:11:19:32][3598.4142872256][-main-] Fatal: modload: failed to load module '/usr/local/aolserver40r10/bin/nslog.so

----------------------------------------------------------

Collapse
Posted by Luis Garcia on

I see several problems:

1. "/var/openacs-5.1.5/etc/config.tcl" should actually be "/var/SERVICE_NAME/etc/config.tcl". Once you do that (change the folders name to the service name, then you need to change the ownership of the folder and ALL the files inside to the user who owns the service. See the docs, it is there.

2. Once you succesfully complete the previous step, then you need to start the server under the user who owns the service if you are not creating this for production in port 80 like this:

Let's say my service is called "lgarcia", so to start I do:

su - lgarcia

password

/usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/lgarcia/etc/config.tcl

If for production in port 80, then you need to start the service as root and use -u USER_OWNER_OF_SERVICE and port 80 for it to work. For instance:

Again my service is called "lgarcia", so to start I do:

su -

password

%>/usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/lgarcia/etc/config.tcl -u lgarcia -g web -b 192.168.1.2:80

Collapse
Posted by Iuri Sampaio on
I see this thread was from a long time ago. But i found that thread when i was searching for something else, and as i knew a solution and I don't want to loose the habit to contributte, here we go :)

Ashwin you had just a simple problem of permission denied.

To solve it you need set write permission to openacs user on aolserver directory

# avoid pid not found errors in the log
mkdir /usr/lib/aolserver4/log chown root:web /usr/lib/aolserver4/log chmod 775 /usr/lib/aolserver4/log

this is already on our docs: