Re: [Nolug] file upload problems w/ PHP

From: krunk <krunkalot_at_hotpop.com>
Date: Tue, 29 Jun 2004 17:27:36 -0500
Message-Id: <86064C0F-CA1B-11D8-A4BB-000A95B6BD3E@hotpop.com>

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?

On Jun 29, 2004, at 4:01 PM, Steven Cardella wrote:

> Hi all,
>
> I'm putting together a website, and I'm trying to set it up so that my
> users can upload pics with their articles/news/etc and have it work
> automagically...
>
> The problem is that I'm running into permissions problems...
>
> they'll upload a file, and it saves it to /tmp/whatever.jpg. No
> problem here.
> If i try using move_uploaded_file("/Users/someone/images") or similar,
> it fails; permissions problem.
>
> If I try to have it run the shell script, via
> $errs=`ncftpput -u someone -p somepasswd localhost ./images/
> /tmp/whatever.jpg`;
> it'll upload the file alright, but I won't have permission to read it
> (for some reason).
> If I try to add a -X "chmod 0766 %s", it doesn't seem to execute the
> extra ftp command:
> $errs=`ncftpput -u someone -p somepasswd -X "chmod 0766 %s" \
> localhost ./images/ /tmp/whatever.jpg`;
>
> I can't su to user someone, because it's not on the sudoers list, and
> I don't have root access.
>
> manually using ncftp to upload it works fine, ie:
> ncftp -u someone -p somepasswd localhost
> >cd images
> >put /tmp/whatever.jpg
> >chmod 0766 whatever.jpg
> >quit
> gives me exactly what I need, it's just being ornery to automate.
>
> btw, the people I'm writing it for wouldn't understand how to use a
> ftp program.
>
> Ciao,
>
> Steve Cardella
>
> ___________________
> 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