Re: I need some help with this code

From: Date: Thu, 30 Aug 2001 09:19:48 +0000
Subject: Re: I need some help with this code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65223@lists.php.net to get a copy of this message
You may want to use: http://php.net/chown http://php.net/umask http://php.net/chmod -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com 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 <javi@neodigit.es> Newsgroups: php.general To: <php-general@lists.php.net> 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 > > > >

« previous php.general (#65223) next »