Re: [App_rpt-users] Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
For your shell script, you probably only need 755 chmod 755 /etc/path/to/script/filename.sh You can type chmod --help for some quick help man chmod for extended manual pages, Q to exit or visit http://www.computerhope.com/unix/uchmod.htm for further reading and understanding. I am uncertain of your php script as I don't have enough info. You may need to set ownership of the file? There are other potential issues from the php server for file access/permission & security. To much for email. You will find google is your friend. You will have to start with the obvious that the shell script lacked permissions and go from there. Make sure your shell script has a proper shebang ie start the first line of the file with #!/bin/bash or the path to the interpreter you are using (normally bash). Without the proper shebang, it will likely not run anything with external calls. Without proper permissions, it will not run at all except when you (the owner of file) run it from a command line. ...mike/kb8jnm -------- Original Message -------- Subject: Re: [App_rpt-users] Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?) From: Skyler Fennell <electricity440@gmail.com> Date: Thu, December 04, 2014 7:36 pm To: "<mike@midnighteng.com>" <mike@midnighteng.com> Cc: "app_rpt-users@ohnosec.org" <app_rpt-users@ohnosec.org> Do you happen to know how I can check permissions/the chmod code which I can use to fix permissions? On Dec 4, 2014, at 2:53 PM, <mike@midnighteng.com> <mike@midnighteng.com> wrote: "If the script runs fine from your command line, and not for remote user", I say again, it is a file ownership /permissions issue. Check the script file for proper permissions and that the script starts off with a proper shebang. ...mike/kb8jnm -------- Original Message -------- Subject: Re: [App_rpt-users] Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?) From: Skyler F <electricity440@gmail.com> Date: Thu, December 04, 2014 3:49 pm To: "<mike@midnighteng.com>" <mike@midnighteng.com>, "app_rpt-users@ohnosec.org" <app_rpt-users@ohnosec.org> The script works fine when I run it normally. I also tried to enter the specific command on the web page. On Thu, Dec 4, 2014 at 11:25 AM, <mike@midnighteng.com> wrote: Does - '/etc/asterisk/scripts/disconnect' script have ownership rights ? ...mike/kb8jnm -------- Original Message -------- Subject: [App_rpt-users] Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?) From: Skyler Fennell <electricity440@gmail.com> Date: Thu, December 04, 2014 12:05 pm To: "app_rpt-users@ohnosec.org" <app_rpt-users@ohnosec.org> I created a simple php file where anyone with the link can disconnect my nose from all links if something wrong is going on (due to the fact my node is same channel, half duplex linked, and if it was stuck on transmit, local transmissions would double with the node) <?php echo "All links sucessfully disconnected from 40764, KDØWHB test1"; echo '><pre>'; // Outputs all the result of shellcommand "", and returns // the last output line into $last_line. Stores the return value // of the shell command in $retval. $last_line = system('/etc/asterisk/scripts/disconnect', $retval); // Printing additional info echo ' </pre> <hr />Last line of the output: ' . $last_line . ' <hr />Return value: ' . $retval; ?> The code was found on the php website as a sample and I just changed ls to my script that works when ran from a normal shell. Visiting kd0whb.duckdns.org/disconnect.php shows the output of "unable to connect to remote" Any suggestions? Thanks, Skyler, KDØWHB _______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button" You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem. _______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button" You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem. -- Skyler Fennellamsatnet.info KDØWHB electricity440@gmail.com _______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the "Unsubscribe or edit options button" You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.
participants (1)
-
mike@midnighteng.com