Project

General

Profile

Support #2261

How to automatically create /var/run/wt with right permissions?

Added by Anonymous about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Anonymous
Target version:
Start date:
10/01/2013
Due date:
% Done:

0%

Estimated time:

Description

Hi.

A common problem that emerges when configuring Wt is Apache's fatal error: cannot create run directory /var/run/wt.

From many posts in the forum, we know that to resolve this is enough create the directory and set the right permissions. On Ubuntu 12.10:

$> mkdir /var/run/wt

$> chown www-data: /var/run/wt

That solves our problem... until the next reboot.

Is there an automatic solution for this? I was thinking in putting these command on crontab, but that doesn't seem the right way to do the work.

Thanks in advance.

David.

#1

Updated by Wim Dumon about 7 years ago

  • Tracker changed from Bug to Support
  • Status changed from New to Feedback

http://unix.stackexchange.com/questions/2109/create-directory-in-var-run-at-startup

This sounds more like an ubuntu question. It seems that the recommended way is to create the /var/run directory during system startup in an init script.

Note that you can configure Wt to use a different directory than /var/run (RUNDIR, a cmake configuration flag, or in wt_config.xml, run-directory in section connector-fcgi.

BR,

Wim.

#2

Updated by David Pires about 7 years ago

Hello, Wim.

Thank you very much for the support.

Following your advices, I solved my problem putting the following piece of code at the end of my /etc/rc.local:

# Create directories at /var/run in order to allow some apache services.
# Currently created:
#   /var/run/wt (C++ Web Toolkit default path)
if [ ! -d /var/run/wt ]; then
  mkdir /var/run/wt/
  chown www-data: /var/run/wt/
fi

exit 0

Now my Wt web site is up and running as soon as the server returns from a reboot.

Thank you for the help.


David da Silva Pires

#3

Updated by Wim Dumon about 7 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF