in reply to How run a daemon as non-root user

How exactly are you starting the daemon process? I would probably use the files in /etc/init.d and /etc/r.*. These in turn depend on start-stop-daemon, which has a man page. I think you would want the --chuid option.

Replies are listed 'Best First'.
Re^2: How run a daemon as non-root user
by halfbaked (Sexton) on Dec 06, 2008 at 01:51 UTC
    Yeah I'm starting them with /etc/init.d

    I think my issue is that I don't know how to create a user with the proper permissions to create a pid /var/run

    Maybe I should be searching Debian docs on how to do this.

    Thanks for everyone's help.
      OK, I figured it out. It wasn't a Perl question, but rather a Linux question.

      All I had to was to chown the pid file to the user that's starting the process. It seems so obvious now.

      Thanks everyone. You'd think that after working in technology for almost 12 years that I wouldn't have to ask stupid questions, but ... Linux admin has never been my strong suit.