25 Apr 2012 12:20
Getting a process to run as root
Peter Hickman <peterhickman386 <at> googlemail.com>
2012-04-25 10:20:41 GMT
2012-04-25 10:20:41 GMT
I have an application that scans log files that is written in Ruby. It is installed as the user log_watcher but needs to be run as root so that it can have the rights to read the various log files that it needs. Essentially the service/log_watcher/run file comes down to "sudo ruby log_watcher.rb", the log_watcher user has passwordless sudo rights. We have runit / supervise installed but when we try and start the application it complains about supervise/ok or supervise/lock being unavailable which means that the process is not being restarted after a reboot. How do I get to run the process as root from the log_watcher user. I've tried various things I've seen in the wiki and got back from googling but nothing seems to work. Or perhaps there is another way around this?
RSS Feed