●獅吼文集 楔子? 佛法入門? 三藏經典? 修持正見? 法義討論? 實修儀軌? 名相淺釋? 佛教X檔案? 學佛心得? 佛教人物? ●其它 暫存區? 工作討論? 編輯選單 |
The following information appears after pressing "Save" on the Edit page:
Possible CauseWhen attempting to restore the wiki from a backup copy, the user copies wiki files to the wiki.d directory. The newly uploaded copies have an improper permission or owner. For example, if the user's name on a system is "qwerty", the uploaded files' owner will be "qwerty".Note: Files created by PmWiki have permissions of 664 (-rw-rw-r--) and usually owner "www", the web server. The web server may run under a different name, such as "nobody". SolutionsThe best solution is to reset the newly uploaded files' owner. This may be done by running the unixchown command, but only superusers have access to this. Here are some other options:Solution #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. 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. To do this:
<?php mkdir("wiki.d"); umask(002); system("/bin/cp oldwiki.d/* wiki.d"); ?>
<?php system("/bin/chmod 664 wiki.d/*"); ?>Again, put the script in your pmwiki directory and call it in a browser; it was successful if there were no results. Solution #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: 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).Solution #3. You could also copy your files directly into wikilib.d, but that directory is better reserved for the PmWiki distributions. Solution #4. Set the permissions on all of the restored wiki files to 777. There is a security risk here, and this is not the recommended solution. |