You may want to use:
http://php.net/chown
http://php.net/umask
http://php.net/chmod

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Javi - Neodigit <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 26, 2001 6:03 AM
Subject: I need some help with this code


> 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");
> sleep(1);
>
> fclose($tftp);
> ------------------------------------
> Thanks for helping
> Javi
>
>
>
>


-- 
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