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 !
>>
>>
>> Sebastián Renzi
>> Consultoría & 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]