Re: Running as a certain user

2003-11-29 Thread Jez Hancock
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/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Running as a certain user

2003-11-29 Thread Derrick Ryalls
 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...


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Running as a certain user

2003-11-29 Thread Steve Bertrand
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

 
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Running as a certain user

2003-11-29 Thread Derrick Ryalls
   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.
 

Thanks, that is close enought to what I was looking for.  All this time
I though 'su' meant 'super user'.


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: running at as a user

2003-09-21 Thread Nils Vogels
On Sun, Sep 21, 2003 at 01:38:59PM -0400, William O'Higgins wrote:
 How do you run at as a user?  I get the following error:
 
 at: you do not have permission to use this program
 
 I thought it might work to change the permissions on the executable to
 555, but that yields the same result.  Suggestions?

Yeah, read the man-page. It says :

FILES
 /var/at/jobsdirectory containing job files
 /var/at/spool   directory containing output spool files
 /var/run/utmp   login records
 /var/at/at.allowallow permission control
 /var/at/at.deny deny permission control
 /var/at/jobs/.lockfile  job-creation lock file

HTH  HAND

-- 
Simple guidelines to happiness:
Work like you don't need the money,
love like your heart has never been broken and 
dance like no one can see you.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]