[Pmwiki-users] Re: File permissions/ownership problem
Patrick R. Michaud
pmichaud at pobox.com
Fri May 9 11:55:56 CDT 2003
On Fri, May 09, 2003 at 09:53:51AM -0500, Janice Heinold wrote:
> I hope somebody can help me with this...
>
> ---------------
> WHAT I THINK IS CAUSING THE PROBLEM
>
> The wiki files I restored from my backup had permission 644 (-rw-r--r--) and
> owner "janice".
Correct.
> I changed permission on one of the restored files - WikiSandbox - to 664. I
> was still unable to edit it. I had to change the permission to 777 before I
> was able to edit it (it saves the changes but still gives a permission
> denied for AllRecentChanges). I concluded that the permissions must be set
> to 777 or the owner should be reset to "www".
Correct.
> ---------------
> OPTIONS I SEE AT THIS POINT
>
> 1. Set the permissions on all of my restored wiki files to 777. I assume
> there is a security risk here. If I have to do this, I hope there is an
> easier way than changing them one by one through either my ftp program or my
> heb host's administrative suite.
This will work, but may not be the best solution.
> 2. Run chown somehow. I don't have superuser access and haven't had any
> success doing this up to now. If anybody has any tips for me here, they're
> welcome.
Probably not an option.
> 3. Contact the web host's tech support. I'm not sure if they'll run chown
> for me. I hope to exhaust all possibilities before I make that request.
Good idea. Here's one or two more options:
1. Write a restore script that will run from the web server to copy the
files from your old wiki.d directory into your new one. To do this:
- rename your old wiki.d to oldwiki.d
- change permissions on your pmwiki directory to 2777
- write a php script as follows:
<?php
mkdir("wiki.d");
umask(002);
system("/bin/cp oldwiki.d/* wiki.d");
?>
This will copy the files from oldwiki.d to wiki.d, but the new
files will be owned by www and have the correct permissions.
2. You can rename wiki.d to oldwiki.d and then add it to the list of
directories to be searched, and let PmWiki create and manage a new
wiki.d directory. Just add:
$WikiLibDirs = array("wiki.d","oldwiki.d","wikilib.d");
to local.php. This tells PmWiki to look in wiki.d, oldwiki.d, and
wikilib.d when displaying a page. However, all of the edited pages
will go in "wiki.d" (or whatever $WikiDir is set to).
3. You could also copy your files directly into wikilib.d, but I think
that directory is better reserved for the PmWiki distributions.
Pm
More information about the pmwiki-users
mailing list