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
Received on 06/29/04
This archive was generated by hypermail 2.2.0 : 12/19/08 EST