[Pmwiki-users] Uploads directories and permissions

Patrick R. Michaud pmichaud
Mon Dec 6 07:25:18 CST 2004

On Mon, Dec 06, 2004 at 10:00:47AM +0100, Laurent DAVID wrote:
> I've recently upgraded from PmWiki 1.0 to 2.0, and I've wondered whether
> the permissions on upload directories are handled.
> Indeed, I've noticed that lines calling umask fonction are not present 
> anymore in upload.php script file (variable $UploadPerms).
> Does it mean it is handled elsewhere ? Or is there something missing in 
> that script file ?

In 2.0, permissions are generally handled by the fixperms() function,
which is called whenever a file is created/written by PmWiki.
The mkdirp() function also calls fixperms() whenever it needs to
create directories.

Fixperms() uses the information available to it to determine the best
set of permissions to use for each file or directory.  In general, fixperms
uses the following criteria in choosing file/directory permissions: 
(1) ensure PmWiki continues to operate, (2) ensure the account holder 
has access to the file, and (3) choose the most restrictive set of 
permissions that can work with #1 and #2.  


More information about the pmwiki-users mailing list