I tried to install dokuwiki from the download on Manjaro with NGINX, and I have the same message even though the permissions and owner are correct:
- I copied the archive's content with sudo
tar xf dokuwiki-9bd497d2fcfacb679f77bc4ba4b8fa58.tgz -C /usr/share/webapps
- I changed ownership with
sudo chown -R http:http <dest>
EDIT: By the way, do not do a chmod 777
(or 666 for files) as suggested in some places, you'll give write access to everyone! The permissions as they are in the archive are fine, no need to change anything. Just be aware that the web server, Apache / NGINX / ... shouldn't normally run its pool with the root
access, it's usually something else like http
. If your web server pool runs as root, check why because it's not good practice.
I debugged it and it was apparently due to the inc/init.php testing the write permission on the data
directory. I tried by adding a condition to exclude the directory from the test, just to see, but there are similar problems later so I reverted.
Then I moved the whole directory and installed it with pacman instead, an older version but there are no differences in the php files. I noticed that some directories or files were symbolic links:
dokuwiki_pacman/lib/tpl
dokuwiki_pacman/lib/plugins
dokuwiki_pacman/.htaccess
dokuwiki_pacman/conf
dokuwiki_pacman/data
I reload the page in the browser:
=> now it goes further and shows the installation page, though it still gives an error: {DOCUMENT_ROOT}/conf/ is not writable by DokuWiki. You need to fix the permission settings of this directory!
- maybe it's my nginx.conf, I'll check that later.
Now I replace the dokuwiki directory with the one I downloaded from here:
=> I get the original error on ./data/pages
Interesting, so now I move data into another directory (the installation put that in /var/lib/dokuwiki), and create a symbolic link to it:
=> I get the next step!
So it seems that we must replace a few directories with symbolic links, so that the write test is successful. Somehow I suspect that checking the write permission on a directory doesn't work well, at least in some configurations (NGINX 1.20-2.1, php-fpm 8.1.4-1).
Did I miss an installation step saying to do so?
PS: posting here is not easy with the text being hidden all the time under the bottom format toolbar :/