RE: [PHP] Copy function usage ?

2001-08-09 Thread scott [gts]


-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:[EMAIL PROTECTED]]
> Sent: Thursday, August 09, 2001 11:41 AM
> To: Tamas Bucsu; [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]]
> Sent: 09 August 2001 16:36
> To: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

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


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




RE: [PHP] Copy function usage ?

2001-08-09 Thread Jon Farmer

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:[EMAIL PROTECTED]]
Sent: 09 August 2001 16:36
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Copy function usage ?

2001-08-09 Thread Tamas Bucsu

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