Re: [Nolug] file upload problems w/ PHP

From: Friedrich Gurtler <fgurtler_at_tulane.edu>
Date: Tue, 29 Jun 2004 18:20:56 -0500
Message-Id: <F94F6734-CA22-11D8-BEBB-000393452966@tulane.edu>

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.
>
> --
>
>
> Joey Kelly
> < Minister of the Gospel | Linux Consultant >
> http://joeykelly.net
>
>
> "I may have invented it, but Bill made it famous."
> --- David Bradley, the IBM employee that invented CTRL-ALT-DEL
>
> ___________________
> Nolug mailing list
> nolug@nolug.org

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

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