[Pmwiki-users] Permissio to Create Directories

Thomas -Balu- Walter list+pmwiki-users
Mon Jul 19 01:52:38 CDT 2004


On Sat, Jul 17, 2004 at 08:49:58PM -0700, Steven Leite wrote:
> On Tuesday, July 13, 2004 11:18 PM [GMT+1=CET],
> Jeroen Coumans <jeroen at jeroencoumans.nl> wrote:
> 
> > Steven Leite said the following on 14-07-2004 18:50:
> >> I finally have my x-Gallery script to the point where I'm pretty
> >> happy with it, so I've moved it over to a live web-server for more
> >> testing and I immediately ran in to a glitch.  The script has no
> >> permission to create the thumbs/ directory.  It works fine on my
> >> local system, but not on the remote web-server.
> >>
> >> Any ideas how I can trouble-shoot this?
> >
> > IIRC, http://www.pmichaud.com/wiki/IRC/PosixFix should give you the
> > answer to that.
> 
> Thanks for the idea, but that didn't work. I had a look at the
> upload.php script that's included with pmwiki, and it seems to use the
> mkgddir function instead of the mkdir function that my script uses.  The
> upload.php script works fine on my www server, so maybe I need to change
> my script to use mkgddir instead.
> 
> Does this sound reasonable?  Any other ideas welcome.  Thanks.

mkgiddir() is an internal PmWiki function that simply checks wether it
can create a directory or not. In this case it aborts displaying a
message:

"PmWiki wants setgid permissions enabled on <tt>$rparent</tt><br />
before it creates the <tt>$dir</tt> directory.  <br />
Try executing <pre>    chmod 2777 $rparent</pre>
on your server and reloading this page.  Afterwards, you
can restore the permissions<br />to their current setting by executing
<pre>    chmod ".decoct($perms & 03777)." $rparent</pre>If this
doesn't work for you, see the link below."

If it has correct permissions on the parent directory it creates the
directory with the mask 0777.

So your problem is more missing rights on the parent dir than a problem
with mkdir. You need to change those rights before creating thumbs/ just
as before installing PmWiki or enabling uploads.
(http://www.pmwiki.org/wiki/PmWiki/UploadsAdmin)

Using mkgiddir() is probably a good idea though, since it displays a
message in case of problems.

     Balu



More information about the pmwiki-users mailing list