From: Geoff H. <geo...@gm...> - 2009-03-16 12:34:36
|
Hi All, Is there a way to get Devmon to run as a normal user (Hobbit user)? For me, even if I change permissions on the /var/lock/subsys folders, it will not let it run as a normal user. I get the following error: touch: cannot touch `/var/lock/subsys/devmon': Permission denied Reason I want this is so when Devmon goes purple, I can have hobbit (as the hobbit user with group users), run the command to restart the daemon automatically instead of scheduling restart cron jobs. Thanks. Geoff Hallford ################################## Permissions: *AS ROOT* bigbrother:/var/lock # whoami root bigbrother:/var/lock # ls -l total 0 drwxrwxr-t 4 root uucp 96 Mar 9 09:13 . drwxr-xr-x 16 root root 408 Mar 9 08:45 .. drwxr-xr-x 2 root root 48 Jul 10 2008 dmraid drwxrw-rw- 3 root users 208 Mar 16 08:25 subsys bigbrother:/var/lock # cd subsys/ bigbrother:/var/lock/subsys # ls -l total 0 drwxrw-rw- 3 root users 208 Mar 16 08:25 . drwxrwxr-t 4 root uucp 96 Mar 9 09:13 .. -rwxrw-rw- 1 root users 0 Mar 15 09:15 sec.pl -rwxrw-rw- 1 root users 0 Oct 23 14:00 smbfs -rwxrw-rw- 1 root users 0 Mar 15 09:15 snmptrapd -rwxrw-rw- 1 root users 0 Mar 15 09:15 snmptt drwxrw-rw- 2 root users 48 Sep 9 2005 sysconfig *AS HOBBIT* hobbit@bigbrother:/var/lock> whoami hobbit hobbit@bigbrother:/var/lock> ls -l total 0 drwxr-xr-x 2 root root 48 2008-07-10 13:18 dmraid drwxrw-rw- 3 root users 208 2009-03-16 08:25 subsys hobbit@bigbrother:/var/lock> cd subsys/ -bash: cd: subsys/: Permission denied hobbit@bigbrother:/var/lock> ls -l subsys/ /bin/ls: subsys/smbfs: Permission denied /bin/ls: subsys/sysconfig: Permission denied /bin/ls: subsys/sec.pl: Permission denied /bin/ls: subsys/snmptt: Permission denied /bin/ls: subsys/snmptrapd: Permission denied total 0 |
From: Malcolm H. <mal...@gm...> - 2009-03-16 12:41:39
|
> *AS HOBBIT* > > hobbit@bigbrother:/var/lock> whoami > hobbit > > hobbit@bigbrother:/var/lock> ls -l > total 0 > drwxr-xr-x 2 root root 48 2008-07-10 13:18 dmraid > drwxrw-rw- 3 root users 208 2009-03-16 08:25 subsys > > hobbit@bigbrother:/var/lock> cd subsys/ > -bash: cd: subsys/: Permission denied You need execute permission on subsys to be able to cd into it. Also hobbit should be a member of the group that owns it - I recommend you change the group to something other than "users" though. Regards, Malcolm -- Technical copy-editor & proofreader KDE Proofreading Team KDE British English Translation Team http://l10n.kde.org/team-infos.php?teamcode=en_GB Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 |
From: Geoff H. <geo...@gm...> - 2009-03-16 12:56:46
|
Thanks. Forgot about the execute (duh!). I don't believe devmon was designed to run as a normal user though, as I also can't stop the daemon as a normal user, as killproc is in /sbin. I know I can move that to /bin but I don't think that is safe. Stopping Devmon: /etc/rc.d/devmon: line 28: killproc: command not found Any suggestions? Thanks. 'Nobody goes there anymore. It's too crowded.' --Yogi Berra On Mon, Mar 16, 2009 at 8:41 AM, Malcolm Hunter <mal...@gm...>wrote: > > *AS HOBBIT* > > > > hobbit@bigbrother:/var/lock> whoami > > hobbit > > > > hobbit@bigbrother:/var/lock> ls -l > > total 0 > > drwxr-xr-x 2 root root 48 2008-07-10 13:18 dmraid > > drwxrw-rw- 3 root users 208 2009-03-16 08:25 subsys > > > > hobbit@bigbrother:/var/lock> cd subsys/ > > -bash: cd: subsys/: Permission denied > > You need execute permission on subsys to be able to cd into it. Also hobbit > should be a member of the group that owns it - I recommend you change the > group to something other than "users" though. > > Regards, > Malcolm > -- > Technical copy-editor & proofreader > > KDE Proofreading Team > KDE British English Translation Team > > http://l10n.kde.org/team-infos.php?teamcode=en_GB > > Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: > http://www.gmx.net/de/go/multimessenger01 > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Devmon-support mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/devmon-support > |
From: Buchan M. <bg...@st...> - 2009-03-16 13:48:06
|
On Monday 16 March 2009 14:56:28 Geoff Hallford wrote: > Thanks. Forgot about the execute (duh!). I don't believe devmon was > designed to run as a normal user It was. The Mandriva package, the packages I provide for RHEL, and all my systems, have devmon running as non-root (as 'devmon'). > though, as I also can't stop the daemon as > a normal user, Which user the daemon runs as, and which user can start/stop it are different issues. > as killproc is in /sbin. I know I can move that to /bin but > I don't think that is safe. The init script may not have been tested with your distro ... on Red-Hat-style systems, killproc is a function defined in /etc/rc.d/functions, which is sourced by the init script. Newer versions of the initscripts package (e.g. RHEL5 and newer) have a killproc which works with pid files in subdirectories of /var/run, which is used correctly by devmon 0.3.1-b1 (and if not present, it uses an internal function which is basically a copy of the newer killproc) to more reliably shut devmon down when running as non-root. > Stopping Devmon: /etc/rc.d/devmon: line 28: killproc: command not found Here are some options: 1)Adjust the PATH in the init script to include /sbin 2)Submit a patch or new init script for your OS/distro 3)Use packages supplied by your OS/distro Regards, Buchan |
From: Malcolm H. <mal...@gm...> - 2009-03-16 13:09:05
|
> Thanks. Forgot about the execute (duh!). I don't believe devmon was > designed > to run as a normal user though, as I also can't stop the daemon as a > normal > user, as killproc is in /sbin. I know I can move that to /bin but I don't > think that is safe. > > Stopping Devmon: /etc/rc.d/devmon: line 28: killproc: command not found > > Any suggestions? You should be able to run devmon as a user - I have it running as user "devmon". What OS are you running? For Linux, there is a Fedora-style rc script provided which has a RUNASUSER option in it. Also, I've not used killproc - I mainly use kill. Regards, Malcolm -- Technical copy-editor & proofreader KDE Proofreading Team KDE British English Translation Team http://l10n.kde.org/team-infos.php?teamcode=en_GB Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 |
From: Geoff H. <geo...@gm...> - 2009-03-16 13:43:10
|
Hi Malcolm, I am running SUSE 10.0. The kill command is available to the normal users. Can you please send me your sample rc script? Mine is below and has issues obviously as a normal user. ##################### #!/bin/bash # # chkconfig: 2345 90 10 # description: An snmp data collector for the hobbit & BigBrother network # monitoring suites # processname: devmon # pidfile: /var/run/devmon/devmon.pid # config: /usr/local/devmon/devmon.cfg # source function library #. /etc/init.d/functions RETVAL=0 prog="/usr/local/devmon/devmon" start() { echo -n $"Starting Devmon: " $prog RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/devmon } stop() { echo -n $"Stopping Devmon: " killproc devmon RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/devmon } case "$1" in start) start ;; stop) stop ;; restart|reload) stop start ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" exit 1 esac exit $RETVAL ##################### Thanks. 'Nobody goes there anymore. It's too crowded.' --Yogi Berra On Mon, Mar 16, 2009 at 9:08 AM, Malcolm Hunter <mal...@gm...>wrote: > > Thanks. Forgot about the execute (duh!). I don't believe devmon was > > designed > > to run as a normal user though, as I also can't stop the daemon as a > > normal > > user, as killproc is in /sbin. I know I can move that to /bin but I don't > > think that is safe. > > > > Stopping Devmon: /etc/rc.d/devmon: line 28: killproc: command not found > > > > Any suggestions? > > You should be able to run devmon as a user - I have it running as user > "devmon". What OS are you running? For Linux, there is a Fedora-style rc > script provided which has a RUNASUSER option in it. > > Also, I've not used killproc - I mainly use kill. > > Regards, > Malcolm > -- > Technical copy-editor & proofreader > > KDE Proofreading Team > KDE British English Translation Team > > http://l10n.kde.org/team-infos.php?teamcode=en_GB > > Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: > http://www.gmx.net/de/go/multimessenger01 > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Devmon-support mailing list > Dev...@li... > https://lists.sourceforge.net/lists/listinfo/devmon-support > |