I'm using copy() and the final owner is "nobody", I'm opening a socket
connection with fsockopen() so I have a validate user.
I want the validated user to be the owner of the new file
That`s de code:
- open the socket
- validate user
- change dir chmod so we can write
- write the file (with "nobody" owner and I need the "user" owner)
- change back dir chmod
- close connection

$tftp = fsockopen("ftp.dominio.com", 21, $errno, $errstr, 60) or
die("Fallode Conexión");

socket_set_blocking($tftp, false);
fputs($tftp, "user $login\n");
fputs($tftp, "pass $password\n");

$ruta = "/www/".$direc;
fputs($tftp, "SITE chmod 0777 $ruta\n");

copy ("file1.php", "file2.php");

fputs($tftp, "SITE chmod $perm $ruta\n");

Thanks for helping

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to