[pmwiki-users] Upload denied errors

H. Fox haganfox at users.sourceforge.net
Thu Jun 8 09:30:44 CDT 2006


On 6/8/06, H. Fox <haganfox at users.sourceforge.net> wrote:
> On 6/8/06, Pico <pmwiki at ben-amotz.com> wrote:
> > Just passing along this PmWiki/Questions entry to the list for someone to
> > address (on that page, if you would, otherwise discuss here and I'll try to
> > paste in the final answer)
> >
> > Pico
> > - - - -
> >
> > Warning: move_uploaded_file(uploads/IdeaBoard/charslist.jpg):
> > failed to open stream:
> > Permission denied in
> > /home/bbbw/public_html/scripts/upload.php on line 198
> >
> > Warning: move_uploaded_file():
> > Unable to move '/tmp/php4GefOm' to
> > 'uploads/IdeaBoard/charslist.jpg' in
> > /home/bbbw/public_html/scripts/upload.php on line 198
> >
> > PmWiki can't process your request ?cannot move uploaded file to
> > uploads/IdeaBoard/charslist.jpg
> >
> > We are sorry for any inconvenience.
> >
> > My host- i4host.net recently upgraded php to 4.4.2 from 4.4.1.
> > I searched mail archive, it's said that "Safe Mode" was turned on
> > while you crashed such a problem.
> >
> > Does anyone have some ideas on solving this? Thanks a lot!
>
> They need to ask the server administrator to enable safe_mode_gid by
> putting the following line in php.ini and restarting the server.
>
>    safe_mode_gid = On
>
> It's in the server administrator's best interest to do so.
>
> Details here:
>
>    http://qdig.sourceforge.net/Support/PHPSafeMode

p.s.: There's a "Plan B", which is to re-create the group's directory
in uploads/ and move the existing uploaded files into that directory.

   mv uploads/SomeGroup  uploads/SomeGroup.old   # rename group
   mkdir uploads/SomeGroup                       # create replacement
   chmod 777 uploads/SomeGroup                   # set permissions
   mv uploads/SomeGroup.old/*  uploads/SomeGroup # move files

Probably the best way to set up a wiki on a safe mode server is to
just use site-wide uploads.

1. Create the uploads/ directory yourself (rather than letting PmWiki
do it for you).
2. Set 777 permissions on uploads/
3. Add the following to local/config.php

   $UploadPrefixFmt = '';

This way all uploaded files will go into uploads/, avoiding the "PHP
can't work with a directory it created" problem.

Hagan




More information about the pmwiki-users mailing list