From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2130 Path: news.gmane.org!not-for-mail From: Peter Hickman Newsgroups: gmane.comp.sysutils.supervision.general Subject: Getting a process to run as root Date: Wed, 25 Apr 2012 11:20:41 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1335349245 6358 80.91.229.3 (25 Apr 2012 10:20:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 25 Apr 2012 10:20:45 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2364-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Apr 25 12:20:45 2012 Return-path: Envelope-to: gcsg-supervision@plane.gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SMzL2-0000Y5-DL for gcsg-supervision@plane.gmane.org; Wed, 25 Apr 2012 12:20:44 +0200 Original-Received: (qmail 8713 invoked by uid 76); 25 Apr 2012 10:24:28 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 8705 invoked from network); 25 Apr 2012 10:24:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=dtGYOZ1ca/geOQRzuJfhj/bhNV27BXZCVYJ/dRPF+Fs=; b=cQXGs9vImP72ViD3Xgi/mKtpAIpCW/bobUkhATSH2KLl0nFFv9CHF643WiwoS60IKm YZeGxoJpKSA37wu6GkoIgk0dJoC2G2LCH6P7NzG9M1L5LWOf7NmmCxI7mL77JcyzZg/q Kcz9Q50Qh5nPiPrWV/XASIuLmqEccxxGs8U519QelJABXLd4BTfeeaaQrPjKmW7fsaSb 4R+73ggpNDhOvLpqUaehGZZB3/eomfj89V/pq4os914Mo7H52NzQoOfy4+TlK9Roh4fo v/d3GqSJj+qBvoPED/lA4NfOFhmUaLanDrYhZVaa40VoVMPLGScLVhDiWltJIx2RHFmv 7D0w== Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2130 Archived-At: 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?