[pmwiki-users] permissions / owners

Petko Yotov 5ko at 5ko.fr
Wed Oct 5 18:09:57 CDT 2011

On Wednesday 05 October 2011 09:13:19, adam overton wrote :
> i have basically no access to any directory with owner of 99, which is the
> default that pmwiki writes to. nor can i change the permissions for any
> dirs with owner 99. this didn't use to be the case. and now, over the
> weekend i'm completely unable to edit any pages in a directory with owner
> of 99, which is most of my wikis. (the handful of dirs owned by me seem to
> work fine).

Pm has written a function fixperms() which is called every time a file is 
created (page or uploaded file) and when a directory is created (in the 
uploads directory, or a wiki.d subdirectory). Not all recipes call this 

This fixperms() function is really smart: if the owner of the newly created 
file or directory (99, "nobody", "www"...) is not the same as the owner of the 
directory where index.php is (your SSH/FTP account), it will enable read and 
write permissions of the file/dir for the account.

Without having a way to test your installation, I think:

- either you connect to the account via FTP with a different username/user_id
  than your root directory owner -- it may happen with some FTP servers

- or some of the following PHP functions don't work on your server, could be
  disabled or buggy: fileowner(), filegroup(), fileperms(), chmod()

- or you're using some modified core pmwiki.php file with custom fixperms()
  and/or mkdirp() functions

- or there could be something of which I haven't thought -- a bug in fixperms
  or in PmWiki is not impossible.


More information about the pmwiki-users mailing list