Re: [Nolug] file upload problems w/ PHP

From: Steven Cardella <ssc_at_bertucciinc.com>
Date: Wed, 30 Jun 2004 01:40:53 -0500
Message-Id: <6F2F203C-CA60-11D8-8A09-00039375213A@bertucciinc.com>

On Tuesday, Jun 29, 2004, at 18:20 US/Central, Friedrich Gurtler wrote:

> Joeys method will work, assuming you arent running in safe mode.
>
> If you are running in safe mode, the apache process must also be the
> owner of the directory for move_uploaded_file() to work.
>
> Just a thought (that popped out at me while rtfm-ing)
>
>
> On Jun 29, 2004, at 6:21 PM, Joey Kelly wrote:
>
>> On Tuesday 29 June 2004 5:27 pm, krunk spake:
>>> I'm relatively new to apache. But could it be that they the apache
>>> user
>>> (or the uid that apache runs under) does not have write permissions
>>> to
>>> the directory?
>>
>> This sounds like your PHP application is broken somehow,
>> permissions-wise. All
>> you have to do is "chmod -R o+rw
>> /path/to/the/application/upload/directory/",
>> and that should fix it.
>>
>> What does the command do? It sets read and write permissions for
>> "others". You
>> are the owner "u", your group members are "g", and everyone else is
>> "o".
>> Since apache has its own username and its own group, changing
>> permissions for
>> "others" affects apache's access.
>>
>> If you wanted more security, you could change the ownership of the
>> directory
>> to the apache user and group. If this is your box, and you *trust*
>> everyone
>> that has an account on it, simply setting permissions on the
>> directory is
>> probably adequate.
>>
>>

don't know how, but it works now, thanks for the help anyway.

Ciao,

Steve Cardella

___________________
Nolug mailing list
nolug@nolug.org
Received on 06/30/04

This archive was generated by hypermail 2.2.0 : 12/19/08 EST