Re: [PHP] Problems uploading Files

2001-03-23 Thread Carsten Gehling

From: "Kilian" [EMAIL PROTECTED]
Sent: Thursday, March 22, 2001 7:28 PM


 The user the webserver process runs under may not have the permission to
 upload the file. In many cases, the webserver runs as nobody. Thus, if you
 want to upload a file, nobody needs write-access to the directory into
which
 the file should be uploaded.

   -- Kilian

You sure your name's not Odysseus? :-)

"...nobody blinded me..."

- Carsten



-- 
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] Problems uploading Files

2001-03-23 Thread PHPBeginner.com

You have to chmod that directory (not needed for FTP of course)


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Renzi, Sebastian [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 3:18 AM
To: PHP General List
Subject: [PHP] Problems uploading Files


Hello again ! , i have a script that uploads a file , when i use the
function move_uploaded_file() an error raises ,"Permission denied ."
,but if i upload the same file thru an ftp client it works correctly !


Sebastin Renzi
Consultora  Desarrollo de Sistemas.
CODES S.A


--
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 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] Problems uploading Files

2001-03-22 Thread John Almberg

Hello Sebastian,

What a timely posting! I am trying to figure out how to allow a user (using
any internet-connected pc) to upload a file to my PHP-enabled server. I am
trying to use PHP and the FTP functions, but can't figure out how to address
the file on the user's machine. Any hints from anyone as to how to do this?
Or am I on the wrong track, altogether? Someone else suggested that I use an
HTML 'upload', but I can't find anything about this in my HTML
documentation.

Any help much appreciated!!!

John

 -Original Message-
 From: Renzi, Sebastian [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 22, 2001 1:18 PM
 To: PHP General List
 Subject: [PHP] Problems uploading Files


 Hello again ! , i have a script that uploads a file , when i use the
 function move_uploaded_file() an error raises ,"Permission denied ."
 ,but if i upload the same file thru an ftp client it works correctly !


 Sebastin Renzi
 Consultora  Desarrollo de Sistemas.
 CODES S.A


 --
 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 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] Problems uploading Files

2001-03-22 Thread Kilian

Renzi, Sebastian [EMAIL PROTECTED] wrote:

 Hello again ! , i have a script that uploads a file , when i use the
 function move_uploaded_file() an error raises ,"Permission denied ."
 ,but if i upload the same file thru an ftp client it works correctly !

The user the webserver process runs under may not have the permission to
upload the file. In many cases, the webserver runs as nobody. Thus, if you
want to upload a file, nobody needs write-access to the directory into which
the file should be uploaded.

  -- Kilian


-- 
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] Problems uploading Files

2001-03-22 Thread Kilian

John Almberg [EMAIL PROTECTED] wrote:

[...]
 Someone else suggested 
 that I use an
 HTML 'upload', but I can't find anything about this in my HTML
 documentation.

input type="file" ...

  -- Kilian

-- 
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] Problems uploading Files

2001-03-22 Thread Julian Wood


Sebastian,

Apache is running as a user, usually nobody:nobody, or sometimes www:www.
That user is trying to move the file when you do the move in php. When you
login through an ftp client, a different user is doing the move (you). You
need to make sure that the user nobody has enough permissions on your target
directory to do the move. Depending on how locked down you want it, there
are several options: rwx for owner only, make the owner/group of the
directory nobody. rwx for group - change the directory's group to nobody, or
add nobody into another group (along with, for instance, yourself) and make
that directory belong to this new group. There are several more ways, but
you probably want to keep away from 777 permissions on the directory if
possible.

John - you want to do what Sebastian is doing. Check out Chapter 19.
Handling file uploads in the php manual. It has everything you need to get
going.

Julian


-- 
Julian Wood

Multimedia Developer
University of Calgary



on 3/22/01 11:28 AM, John Almberg at [EMAIL PROTECTED] wrote:

 
 Hello Sebastian,
 
 What a timely posting! I am trying to figure out how to allow a user (using
 any internet-connected pc) to upload a file to my PHP-enabled server. I am
 trying to use PHP and the FTP functions, but can't figure out how to address
 the file on the user's machine. Any hints from anyone as to how to do this?
 Or am I on the wrong track, altogether? Someone else suggested that I use an
 HTML 'upload', but I can't find anything about this in my HTML
 documentation.
 
 Any help much appreciated!!!
 
 John
 
 -Original Message-
 From: Renzi, Sebastian [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 22, 2001 1:18 PM
 To: PHP General List
 Subject: [PHP] Problems uploading Files
 
 
 Hello again ! , i have a script that uploads a file , when i use the
 function move_uploaded_file() an error raises ,"Permission denied ."
 ,but if i upload the same file thru an ftp client it works correctly !
 
 
 Sebastin Renzi
 Consultora  Desarrollo de Sistemas.
 CODES S.A
 
 


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