Forum OpenACS Q&A: Re: Permission Error on new install when installing package

Dear Raul,

i've just tested install from repository, and everything worked fine for me. The problem seems to be that the tmpdir is not set appropriately (the server should have no write permission on /, and it does not have to have it).

Can you check (e.g. from the developer shell), what the result of [ns_config ns/parameters tmpdir] is? It looks like tmpdir is set to "" (empty string) at your installation.

The tmpdir is determined as following:
a) if "tmpdir" is configured in the ns/parameters section the value is taken.
b) otherwise, if the environment variable TMPDIR is set, its value is taken.
c) otherwise, the value of the compile time macro P_tmpdir is used.

On most installations, TMPDIR (b) is actually used. If my guess concerning tmpdir is incorrect, we have to check version numbers in more detail.

All the best
-gustaf neumann

Thank you for you help.

Yes the tmpdir is set to ""

What is it supposed to be set to?

How do I set it?

Thank you


try setting temp dir to "/tmp" or "/var/tmp" per:


In case the value comes from the environment variable TMPDIR: Since ubuntu (at least the version i've checked) does not set TMPDIR, it has been set to "" on your system. Setting TMPDIR to "" is quite unusual. See [1] for how to set environment variables for a single shell, for a user or for the full system. You can set the environment variable e.g. in the script starting the server.

In case, the value is from you config file: check your startup-file for a add a line containing "tmpdir". If it is there, delete the line.

An appropriate value is e.g. "/tmp" (maybe with a trailing slash) as Benjamin already mentioned.



Thank you for your help.

I added it to the /var/www/oacs-oacs-5-8/etc/config.tcl and I am still getting the same error. Where in the config.tcl file do I add it?

I tried here:
ns_section ns/parameters
ns_param serverlog ${serverroot}/log/error.log
ns_param home $homedir
ns_param tmpdir /tmp

Thank You

yes, the place looks correct.

Just to be sure: is this really the config file you are using to start the server? Per default, the install script of [1] installs the startup script to ${ns_install_dir}/config-${oacs_service}.tcl, which is /usr/local/ns/config-${oacs_service}.tcl per default, and not in /var/www. There is nothing wrong about installing it there. I find it just hard to believe, that setting the parameter has no effect on querying the parameter later (via [ns_config ns/parameters tmpdir]).

In case, this was the file used for startup, replace in your build-dir naviserver-4.99.6/nsd/nsmain.c by, cd to naviserver-4.99.6, and do there a "root make install". After this, start your server; you should early during startup in the log file a line containing "get tmpdir".

[06/Jul/2014:13:07:44][4863.7fff777a7310][-main-] Notice: get tmpdir - config value 0x7f8b8d83fbb0 </tmp>
What do you get? What version of Ubuntu are you using?


I updated the wrong config file.

After I updated:

It worked.

Thank you for your help.