From owner-freebsd-questions@FreeBSD.ORG Thu Dec 11 22:01:04 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BABD16A4CE for ; Thu, 11 Dec 2003 22:01:04 -0800 (PST) Received: from be-well.no-ip.com (lowellg.ne.client2.attbi.com [66.30.200.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D2C543D35 for ; Thu, 11 Dec 2003 22:01:03 -0800 (PST) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.no-ip.com (Postfix, from userid 1147) id 85AE674; Fri, 12 Dec 2003 01:01:02 -0500 (EST) Sender: lowell@be-well.ilk.org To: David.Bear@asu.edu References: <20031211173501.G4978@asu.edu> From: Lowell Gilbert Date: 12 Dec 2003 01:01:02 -0500 In-Reply-To: <20031211173501.G4978@asu.edu> Message-ID: <441xrah8wx.fsf@be-well.ilk.org> Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: startup scripts in /usr/local/etc/rc.d X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 06:01:04 -0000 David Bear writes: > I am wondering if scripts in /usr/local/etc/rc.d MUST be owned by root > in order to be run. No. They have to be executable by root. > If I have a daemon on want started, AND I want it to run as user > "DORK", can I have the binary and the startscript owned by user "DORK" > in order to have it started that way? It will run, but it will still run as root. > the more I think about this, the more I get confused... Apparently. > If a startup script lives in /usr/local/etc/rc.d does its ownership > determine the ownership of the process it starts? No. > or is the the owner of the binary the script starts that determines > the owner of the process Not that either. > And, if it needs to change ownership, is it up to the program itself > to change who it runs as? The script can start a program under a different user if it wants. Many of the standard ones do so, typically using su(1). -- Lowell Gilbert, embedded/networking software engineer, Boston area: resume/CV at http://be-well.ilk.org:8088/~lowell/resume/ username/password "public"