You are not logged in.

#1 2020-05-14 04:43:58

pirateofms
Member
Registered: 2010-05-10
Posts: 23

[SOLVED]Dokuwiki permissions problem

EDIT:  I ended up giving up and just installed from tarball into /srv/http/.
Works perfectly. 


Following the wiki to get dokuwiki set up, I've run into a snag with the installer included.  I get an error:

    {DOCUMENT_ROOT}/conf/ is not writable by DokuWiki. You need to fix the permission settings of this directory! 

I've reinstalled thinking I had broken something, no help.
I've changed the permissions and ownership of /usr/share/webapps/dokuwiki to http:http, no change.
Looking through the dokuwiki permissions page, everything looks like it's right, but I still get this error.  Is there something I'm missing?

I had to change the ownership of the data folder to get it to work, but the same thing doesn't work with the conf folder.

And I'm at my wit's end trying to figure it out.  The relevant directories are as follows:

drwxr-xr-x 6 root root 4.0K May 13 21:22 dokuwiki/

drwxr-xr-x  2 root root 4.0K May 13 20:18 bin/
lrwxrwxrwx  1 root root   35 Jan  9  2019 conf -> ../../../../../etc/webapps/dokuwiki/
lrwxrwxrwx  1 root root   36 Jan  9  2019 data -> ../../../../../var/lib/dokuwiki/data/
drwxr-xr-x  8 root root 4.0K May 13 20:18 inc/
drwxr-xr-x  6 root root 4.0K May 13 20:18 lib/
drwxr-xr-x 11 root root 4.0K May 13 20:18 vendor/
-rw-r--r--  1 root root  18K Jan  9  2019 COPYING
-rw-r--r--  1 root root 3.5K Jan  9  2019 doku.php
-rw-r--r--  1 root root  19K Jan  9  2019 feed.php
-rw-r--r--  1 root root 2.1K Jan  9  2019 index.php
-rw-r--r--  1 root root  19K Jan  9  2019 install.php
-rw-r--r--  1 root root  306 Jan  9  2019 README
-rw-r--r--  1 root root   20 May 13 21:22 users2.php
-rw-r--r--  1 root root  666 May 13 19:34 users.php
-rw-r--r--  1 root root   21 Jan  9  2019 VERSION
/etc/webapps/dokuwiki
-rw-r--r-- 1 http http  448 Jan  9  2019 acl.auth.php.dist
-rw-r--r-- 1 http http 2.0K Jan  9  2019 acronyms.conf
-rw-r--r-- 1 http http  13K Jan  9  2019 dokuwiki.php
-rw-r--r-- 1 http http  354 Jan  9  2019 entities.conf
-rw-r--r-- 1 http http 1.7K Jan  9  2019 interwiki.conf
-rw-r--r-- 1 http http 1.2K Jan  9  2019 license.php
-rw-r--r-- 1 http http  462 Jan  9  2019 local.php.dist
-rw-r--r-- 1 http http   32 Jan  9  2019 manifest.json
-rw-r--r-- 1 http http 2.6K Jan  9  2019 mediameta.php
-rw-r--r-- 1 http http 2.3K Jan  9  2019 mime.conf
-rw-r--r-- 1 http http  12K Jan  9  2019 mysql.conf.php.example
-rw-r--r-- 1 http http  173 Jan  9  2019 plugins.php
-rw-r--r-- 1 http http  552 Jan  9  2019 plugins.required.php
-rw-r--r-- 1 http http  105 Jan  9  2019 scheme.conf
-rw-r--r-- 1 http http  748 Jan  9  2019 smileys.conf
-rw-r--r-- 1 http http  153 Jan  9  2019 users.auth.php.dist
-rw-r--r-- 1 http http 1.8K Jan  9  2019 wordblock.conf
var/lib/dokuwiki/data/
drwxr-xr-x 2 http http 4.0K May 13 20:18 attic/
drwxr-xr-x 9 http http 4.0K May 13 20:31 cache/
drwxr-xr-x 2 http http 4.0K May 13 20:18 index/
drwxr-xr-x 2 http http 4.0K May 13 21:28 locks/
drwxr-xr-x 3 http http 4.0K May 13 20:18 media/
drwxr-xr-x 2 http http 4.0K May 13 20:18 media_attic/
drwxr-xr-x 2 http http 4.0K May 13 20:18 media_meta/
drwxr-xr-x 2 http http 4.0K May 13 20:18 meta/
drwxr-xr-x 3 http http 4.0K May 13 20:18 pages/
drwxr-xr-x 2 http http 4.0K May 13 20:18 tmp/
-rw-r--r-- 1 http http    0 Jan  9  2019 changes.log
-rw-r--r-- 1 http http  20K Jan  9  2019 deleted.files
-rw-r--r-- 1 http http 6.4K Jan  9  2019 dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.png
-rw-r--r-- 1 http http  12K Jan  9  2019 dont-panic-if-you-see-this-in-your-logs-it-means-your-directory-permissions-are-correct.xcf
-rw-r--r-- 1 http http   32 Jan  9  2019 _dummy

If it's relevant, here's my server block for nginx:

server {
        listen 8002 ssl http2;
        listen [::]:8002 ssl http2;
        server_name wiki.localhost;

				ssl_certificate ssl/server.crt;
 			  ssl_certificate_key ssl/server.key;
         
        root /usr/share/webapps/dokuwiki;
        index doku.php;
				
				error_page 497 https://192.168.11.21:$server_port$request_uri
;
        #Remember to comment the below out when you're installing DokuWiki, and uncomment it when you're done.
#        location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } # secure Dokuwiki

        location ~^/\.ht { deny all; } # also secure the Apache .htaccess files
        location @dokuwiki {
            #rewrites "doku.php/" out of the URLs if you set the userewrite setting to .htaccess in dokuwiki config page
            rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
            rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
            rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
            rewrite ^/(.*) /doku.php?id=$1&$args last;
        }

        location / { try_files $uri $uri/ @dokuwiki; }
        location ~ \.php$ {
            try_files $uri =404;
            fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
        }

    }

Any help is appreciated, I'm up for trying just about anything.

Last edited by pirateofms (2020-05-14 06:42:27)

Offline

#2 2020-05-14 04:56:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 28,733
Website

Re: [SOLVED]Dokuwiki permissions problem

conf is owned by root, according to that paste.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2020-05-14 05:02:42

pirateofms
Member
Registered: 2010-05-10
Posts: 23

Re: [SOLVED]Dokuwiki permissions problem

The links are, but the directories they point to are owned by http.  I can touch a test file with sudo -u http in both of those directories.
I did try changing both of them, but no luck.

Last edited by pirateofms (2020-05-14 05:36:50)

Offline

Board footer

Powered by FluxBB