- Code: Select all
<?php
{
$file = $_POST['file'];
}
system("wget '$file'")
?>
Now, this works great, so I thought to myself, if it works for wget why not rc.d start commands.
So, first, I tried:
- Code: Select all
<?php
system("rc.d start samba")
?>
Which give me the error:
A daemon is starting another daemon, this is unlikely to work as intended. :: Starting Samba Server [BUSY] [FAIL]
So I figured, OK, lets try a different approach. I made a .sh file, and changed the PHP file to run that.
samba.sh:
- Code: Select all
/etc/rc.d/samba start
PHP File:
- Code: Select all
<?php
system("sh samba.sh")
?>
And I get the exact same error. Does anyone know of a way to get this to work, or what I am doing wrong?
Thanks in advance everyone.
