I've setup a debian wheezy server and I'm using runit to keep my services humming along. I've also configured svlogd, but that's where I'm getting problems. When the services start I run "ps aux" and I can see that svlogd has an error:

runsvdir -P /home/[user]/service log:.rrent: /home/[user]/logs/gunicorn/: access denied sv
logd: pausing: unable to open current: /home/[user]/logs/celery/: access denied 

I have runit and svlogd running as my user instead of root. If I "tail ~/logs/celery/current" I see this:

2014-07-05_10:07:44.10589 If you really want to continue then you have to set the C_FORCE_ROOT
2014-07-05_10:07:44.10589 environment variable (but please think about this before you do).
2014-07-05_10:07:44.10590 User information: uid=0 euid=0 gid=0 egid=0

So I'm not sure why the access denied message is there

  • Change the UID of the svlogd process before launching it, then match the permissions in the log directory. Simple. – Avery Payne Nov 14 '14 at 19:02

The error is because there's a known security hole when trying to run it as root and you should only do so if you must.

If you are really sure you want to go ahead, you can set the environment variable from your terminal by:

 export C_FORCE_ROOT="true"

That variable will however only last during your session. To make it last 'forever', add this line to your ~/.bashrc or ~/.profile file.

 export C_FORCE_ROOT="true"

Then source that file;

source ~/.bashrc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.