Quoting James Gregory <[EMAIL PROTECTED]>:

> On Sun, 2004-03-28 at 12:18, Amanda wrote:
> 
> > If I then do
> > if(!move_uploaded_file($_FILES['userfile']['tmp_name'], $dest_file))
> >  (snip error messages for clarity)
> 
> 
> > 
> > it uploads the file just fine, but permissions are set to -rw-------
> > 
> > If I then do
> > $result = chmod ("$dest_file", 0777);
> > if (!$result) 
> >   {
> >   echo "<P>ERROR CHANGING PERMISSIONS FOR $dest_file";
> >   }
> 
> This is probably PHP trying to be "secure". It's been a very long time
> since I've used php, but as a starting point I'd suggest looking in
> php.ini for 'safe mode' or similar. It might also be worth doing the
> chmod before the move. I don't know if it'll change anything, but PHP
> does keep track of the files it uses for uploads, It may let you perform
> operations on uploaded files that you can't do on arbitrary files.
> 
> And, as always, check the filename and so forth.
> 
> HTH,
> 
> James.
 
Safe mode is already off. I'll trying doing a chmod on the uploaded temporary
file before I move it. And yes, the file name is correct (it's held in a variable).

Amanda

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to