Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Nov 2003 23:09:09 +0000
From:      Jez Hancock <jez.hancock@munk.nu>
To:        questions@freebsd.org
Subject:   Re: Running as a certain user
Message-ID:  <20031129230909.GA90670@users.munk.nu>
In-Reply-To: <000b01c3b6cb$1d74dc40$0201a8c0@bartxp>
References:  <000b01c3b6cb$1d74dc40$0201a8c0@bartxp>

next in thread | previous in thread | raw e-mail | index | archive | help
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/

-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031129230909.GA90670>