From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2136 Path: news.gmane.org!not-for-mail From: Wayne Marshall Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Getting a process to run as root Date: Thu, 26 Apr 2012 20:49:20 +0200 Organization: b0llix.net: un!x for the deranged Message-ID: <20120426204920.77c8315d@b0llix.net> References: <20120425150746.414ef293@b0llix.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1335466228 4626 80.91.229.3 (26 Apr 2012 18:50:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Apr 2012 18:50:28 +0000 (UTC) Cc: supervision@list.skarnet.org To: Peter Hickman Original-X-From: supervision-return-2370-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Apr 26 20:50:27 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 1SNTll-0000Qo-7k for gcsg-supervision@plane.gmane.org; Thu, 26 Apr 2012 20:50:21 +0200 Original-Received: (qmail 1913 invoked by uid 76); 26 Apr 2012 18:54:06 -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 1905 invoked from network); 26 Apr 2012 18:54:06 -0000 In-Reply-To: X-Mailer: Claws Mail 3.7.7 (GTK+ 2.22.1; x86_64--netbsd) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2136 Archived-At: On Thu, 26 Apr 2012 16:11:55 +0100 Peter Hickman wrote: > Thanks for your help. I've added the missing groups to the > user and when I run the script from the command line it works > fine (sh ./service/log_watcher/run). > When you run the script from the command line, you should be able to invoke it directly, and not as an argument to the sh command interpreter. That is, this should work: ./service/log_watcher/run If not, then you have a problem: * Does your run script begin with "#!/bin/sh" ? * Is your run script set executable with chmod +x ? > However when I use sv start ./service/log_watcher/ the > permissions have disappeared and the files can no longer be > read. > > I have updated the /etc/sv/runsvdir-log_watcher/run to include > the necessary groups to the chpst -u option but it does not > seem to help (I have also tried the -U option to no avail) > > Any idea where I should be looking? > To say anything more about this, we would really need to see the complete source of your run script. Wayne