From owner-freebsd-questions@FreeBSD.ORG Sat Nov 29 17:26:21 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 48AB316A4CE for ; Sat, 29 Nov 2003 17:26:21 -0800 (PST) Received: from mail2.northnetworks.ca (dev.eagle.ca [209.167.58.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 515E943FB1 for ; Sat, 29 Nov 2003 17:26:19 -0800 (PST) (envelope-from iaccounts@northnetworks.ca) Received: from [127.0.0.1] (dev.eagle.ca [209.167.58.10]) hAU1PECn031230; Sat, 29 Nov 2003 20:25:15 -0500 (EST) (envelope-from iaccounts@northnetworks.ca) From: Steve Bertrand To: Derrick Ryalls In-Reply-To: <000d01c3b6d7$d42e64e0$0201a8c0@bartxp> References: <000d01c3b6d7$d42e64e0$0201a8c0@bartxp> Content-Type: text/plain Message-Id: <1070155541.417.6.camel@ptp.northnetworks.ca> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 29 Nov 2003 20:25:42 -0500 Content-Transfer-Encoding: 7bit cc: 'Jez Hancock' cc: questions@freebsd.org Subject: RE: Running as a certain user X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: iaccounts@northnetworks.ca List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2003 01:26:21 -0000 X-List-Received-Date: Sun, 30 Nov 2003 01:26:21 -0000 X-List-Received-Date: Sun, 30 Nov 2003 01:26:21 -0000 On Sat, 2003-11-29 at 19:20, Derrick Ryalls wrote: > > On Sat, Nov 29, 2003 at 02:49:58PM -0800, Derrick Ryalls wrote: > > > I am running a Counter Strike server on a 4.7 FreeBSD box, and I > > > recently got it all working running as a normal user (had > > been running > > > as root). The game is installed in a users' homedir and > > eventually I > > > will be revoking login rights to the user in question to furthur > > > minimize risk. To do this, I need to be able to run the scripts as > > > the user instead of whoever is logged in as. > > > > > > The structure of the scripts is like this: > > > > > > master script (start stop, public private args) > > > | > > > run_hlds wrapper script ( command line args for hlds_run ) > > > | > > > hlds_run ( Valve prog ) > > > > > > All three of the above scripts are owned by the isolated > > user and have > > > been chmod'ed to 6755. When I log in as a different user > > and try to > > > run the scripts, I get permission issues and am unable to > > fire off the > > > game server. What I need is to be able to run it on demand as the > > > isolated user like a crontab entry. > > > > > > Any ideas on what I am missing? > > I would say you need to make sure that the files are all > > owned by the user you're trying to run the hlds_run app as - > > in the past this has worked fine for me: > > > > chown -R user:user /path/to/hlds/ > > > > I just double checked, all files under that folder are owned by > user:user... Try running the app with the command: # su user -c "/usr/bin/program" from crontab as you said. Steve > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"