I need to redirect some strings to a fifo file with ssh remote command, but always got permission denied, the command I executed is:
ssh rundeck@nagios1 sudo su - root -c 'printf "Disable_Notification;web01;App:Tomcat:Log:webapp" >> /opt/nagios/nagios.cmd'
Then got this error:
bash: /opt/nagios/nagios.cmd Permission denied
The file permisson of nagios.cmd is:
prw-rw---- 1 nagios nagios 0 Mar 16 10:32 /opt/nagios/nagios.cmd
However I can successfully execute this command while I logged in to nagios1 as rundeck user with sudo command:
sudo su - root -c 'printf "Disable_Notification;web01;App:Tomcat:Log:webapp" >> /opt/nagios/nagios.cmd'
The nagios1 is running RHEL5, SELinus is set to Permissive. I don't see any log output(message and secure) while execute the command remotely.
Aucun commentaire:
Enregistrer un commentaire