Problem when uploading files with Apache
nicolas at nicoelro.net
Sun Feb 8 06:33:14 PST 2009
On Sun, 8 Feb 2009 06:11:27 -0800 (PST)
Gabe <nrml at att.net> wrote:
> --- On Sun, 2/8/09, Nicolas Letellier <nicolas at nicoelro.net> wrote:
> > From: Nicolas Letellier <nicolas at nicoelro.net>
> > Subject: Re: Problem when uploading files with Apache
> > To: "FreeBSD Questions" <freebsd-questions at freebsd.org>
> > Cc: "Glen Barber" <glen.j.barber at gmail.com>, "Lowell Gilbert" <freebsd-questions-local at be-well.ilk.org>
> > Date: Sunday, February 8, 2009, 6:02 AM
> > On Sun, 08 Feb 2009 08:53:59 -0500
> > Lowell Gilbert
> > <freebsd-questions-local at be-well.ilk.org> wrote:
> > > Nicolas Letellier <nicolas at nicoelro.net> writes:
> > >
> > > > So, anybody could explain me when I upload a
> > file, rights are www:wheel?
> > >
> > > I'm going to guess that it's just inheriting
> > the group from the
> > > directory. The normal default in BSD is for a file to
> > get the gid
> > > of the directory. The directory you are uploading
> > into should be owned
> > > by the group you want the files to have.
> > That's I always learn. But in this case, it's not
> > true.
> > I upload into "testdir/" which has www:www
> > rights.
> > And I launch my upload script, and the file is www:wheel
> > ........
> > I don't understand.
> > I'm on this problem for 4 hours, and I don't find
> > the solution................
> > --
> > -Nicolas.
> 'www' wouldn't happen to be in the wheel group would it?
Ok, I found! Yeah.
We must set a upload_tmp_dir (instead the default upload_dir). And this folder must have your rights.
By default, this folder has root:wheel (in 1777 mod). So, when Apache copies uploaded files from this folder, it keep the wheel group.
Hope this tip could help others persons.
Thanks for your time and your advices.
More information about the freebsd-questions