On Fri, 30 Nov, 15:24 +1000 Nick Pratley wrote:
> Thanks for the reply Peter, however that isn't what the problem is in my
> case. The /var/spool/sms/outgoing directory on that server is in fact
> world-writable. And as I said I can run it from the command line
> successfully while logged in as the nagios user, which I wouldn't be able to
> do if the permissions were not right.
> 
> Keep in mind that SMS Tools is running on a different server, and I'm using
> SCP to copy the file to that server.


Ah I overlooked it was being copied to a remote server.  As for running as the 
user nagios, how did you achieve that - with su or logging in directly?  I 
found that su doesn't work as expected.

Anyhow, as you say the outgoing dir is world-writeable on the remote server, 
then it should work AFAIK - though why don't you move the notify-by-sms script 
to the remote server and have a sommand on the nagios server such as:


define command {
        command_name    notify-host-by-sms
        command_line    /usr/bin/ssh [EMAIL PROTECTED] 
"/some/path/notify-by-sms $CONTACTPAGER$ \"$TIME$ $HOSTALIAS$ $HOSTSTATE$ 
$NOTIFICATIONTYPE$ $HOSTOUTPUT$\""
}

In my mind it's cleaner than the scp method, though whether or not it'll work 
or not I'm not sure!

Regards,
Peter

Attachment: pgpe1AKpkkHwB.pgp
Description: PGP signature

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to