I want to create new file into
/etc/freeradius
I try to run PHP script,but the file not created
This is my code:
include('Net/SSH2.php');
include('Net/SFTP.php');
$sftp = new Net_SFTP('localhost');
if (!$sftp->login('muhammad', 'Kaynetc0m')) {
exit('Login Failed');
}
$sftp->chdir( '/etc/freeradius' );
$sftp->put("sql.conf", $txt,NET_SFTP_RESUME);
I want to append text to sql.conf file into freeradius directory
this is the output:
ls -l /etc/freeradius/sql.conf
-rw-r----- 1 muhammad freerad 12549 Eyl 25 15:27 /etc/freeradius/sql.conf
In other hands when I execute this code on other path and file it executed nice
chown www-data:freerad /etc/freeradius/sql.conf
)