RE: [PHP] Copy function usage ?

From: Date: Thu, 09 Aug 2001 15:45:31 +0000
Subject: RE: [PHP] Copy function usage ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61999@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 look in httpd.conf to get the user name, then chown the directory to that user ex. chown apache:apache ./dir/ chmod 755 ./dir/ and make sure that you change permissions to all files that you write into the directory to be read-write only (not executable), chown 644 filename and that you put newly uploaded files into a directory *outside* the document root of your webserver (so some random person cannot just upload any random file to your server and have immediate access to it) > -----Original Message----- > From: Jon Farmer [mailto:jonfarmer@enta.net] > Sent: Thursday, August 09, 2001 11:41 AM > To: Tamas Bucsu; php-general@lists.php.net > Subject: RE: [PHP] Copy function usage ? > > > You need to make sure that what ever user the webserver/php runs under has > permissions to read from the source folder/file and write permission for the > destination folder/file. > > Common users for apache/php are "nobody" or "apache" > > regards > > Jon > > Jon Farmer > Systems Programmer > Entanet International Ltd www.enta.net > Tel 01952 428969 > Mob 07968 524175 > > -----Original Message----- > From: Tamas Bucsu [mailto:ta.bucsu@orion-infotech.com] > Sent: 09 August 2001 16:36 > To: php-general@lists.php.net > Subject: [PHP] Copy function usage ? > > > Hi guys, > > I have a problem that's killin' me. As I'm not very good at Linux I don't > know how to set the properties of the folder pics to be able to use the copy > function. (If I'm right and the problem is not some else) Please help. > Here's the code: > > if (file_exists($userfile)) { > copy("$userfile","pics/".$userfile); > } else { > echo "Nem sikerül a következõ file-t feltölteni:".$userfile; > } > > thx > > Tamas Bucsu > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> iQA/AwUBO3KwG8aXTGgZdrSUEQLcsACfaWVByz/Q+Tu5WZgWp+JkwZ+mkOMAnRlG TTQNXq4GlF6pDxl+ufAbNoZw =1pnp -----END PGP SIGNATURE-----

« previous php.general (#61999) next »