Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
The datadir ('pages') at ./data/pages is not found
Avatar
baudegaul #1
Member since May 2013 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: The datadir ('pages') at ./data/pages is not found
Hey, I downloaded dokuwiki and configured something that I read in the dokuwiki website. Then, I copied my dokuwiki folder into my xampp folder, but when I accessed that folder in the browser, there was an error like this:

DokuWiki Setup Error

The datadir ('pages') at ./data/pages is not found, isn't accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?


Do you guys know what happened? What should I do?
And for your information, I am using Mac. So, is there any other configuration that I should do? Or maybe I configured it incorrectly?

I hope you guys can help me out,

Thanks a lot.
This post was edited 2 times, last on 2013-05-22, 11:35 by baudegaul.
Avatar
baudegaul #2
Member since May 2013 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Permission
Thanks guys for helping me out, it was only because of the permission. I can fix it by myself :)
This post was edited on 2013-05-22, 11:17 by baudegaul.
Avatar
thaddeeus #3
Member since May 2013 · 1 post
Group memberships: Members
Show profile · Link to this post
Hi baudegaul,

I'm having the same problem, but I don't know how to fix this issue, could I ask you explain what did you do? I'm using windows 7 and don't know how to work with permissions on windows. Thank you!
Avatar
baudegaul #4
Member since May 2013 · 7 posts
Group memberships: Members
Show profile · Link to this post
Hey thaddeeus,

Do you have the dokuwiki on your xampp folder?
If you have it on xampp folder, all you have to do is change the permission. What I did was using my terminal and write something like "chmod 777" but I don't know if it will be working on windows or not. You should search it on google. Like for example "change permissions on windows".

Thanks a lot
This post was edited on 2013-06-12, 13:01 by baudegaul.
Avatar
rbyte #5
User title: title_here
Member since May 2017 · 3 posts · Location: i'm_on_the_interet
Group memberships: Members
Show profile · Link to this post
Subject: TRY THIS -- Because it WORKED for my Linux Mint 18.1 / apache2 installation
My goal was to create a DokuWiki on a computer I purposely keep OFFLINE hence - localhost

I am writing this to help anyone who is looking for a quick start to getting off the ground with a Linux Mint 18.1 and Apache2 installation. If you use Ubuntu or another ubuntu/mint derivative then this could help you if you get stuck.

I offer no warranty and no support options, i just hopes this helps somebody if they get stuck like i was for the past 2 days:


Step 1: choose Ubuntu or linux mint or other ubuntu derivative

Step 2: install apache2

Step 3: goto: https://download.dokuwiki.org/ and customize your DokuWiki then download it

Step 4: extract your DokuWiki tarball/zip to your apache2's /var/www/html/  directory:

                 /var/www/html/     DokuWiki    /

Step 5: HERE IS WHERE WE GET ANGRY: simply using your browser and going to:

                 localhost/DokuWiki/

             will take you to a page that says:
DokuWiki Setup Error

The datadir ('pages') at ./data/pages is not found, isn't accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?

             but when you click the link "installer" you get the same error message on that page as well!

            
             THE PROBLEM IS::
the permissions page (https://www.dokuwiki.org/install:permissions) doesn't explain how to use terminal to chmod, this isn't a typo because there's a lot of different ways to setup the permissions, the issue we are all having is that we don't see how to set the permissions up even though it is mostly clearly explained in this page. ( people all over the world just think differently is all )

             HERE IS HOW WE FIX IT::


             Ubuntu / Linux Mint 18.1 : ( I used Linux Mint 18.1 for this )

             ( you really should complete all these steps before going to the DokuWiki install.php page in order to prevent getting some errors in terminal if you try going to the page half way throu these steps.

             Step A: open the "files" program ( this is linux mint's windows explorer if you are coming to linux mint 18.1 from a windows background ) and goto:

                 /var/www/html/

             Here you should see your DokuWiki/ folder ( don't go inside it) instead just right-click the white background and click on "Open in Terminal" Note that you shouldn't have to be root but if you do then just click on "Open as root" instead then do a "Open in Terminal"

             Step B: you should now be at:

                 userName@computerName /var/www/html $

             Step C: type this in and hit enter:

                 chmod -R 777 data/ ; chmod -R 777 lib/ ; chmod -R 777 conf/

             If you get a set of errors then it means you tried using your browser to goto the installer page so just delete the whole dokuwiki folder and start over making sure _NOT_ to use the browser till you get done with these steps!!

             Step D: in your terminal window type this in and hit enter: ( i use gedit 3 but if you prefer the default XED text editor then use xed in place of gedit )

                  IF YOU USE GEDIT:   sudo gedit /etc/apache2/apache2.conf

                  IF YOU USE XED:   sudo xed /etc/apache2/apache2.conf

             Step E: find the place where it says: ( NOTE: STEP E is for security which is explained at this page:  https://www.dokuwiki.org/security  BUT you only do what i said in Step E which is usually all you need, however you should still review the entire security page in case other suggestions there will help you for keeping your particular linux/apache installation/configuration secure )

                  <Directory /var/www/>
                     ...
                  </Directory>


             Below that type this all in:

        <Directory /var/www/dokuwiki>
            order deny,allow
            allow from all
        </Directory>

        <LocationMatch "/(data|conf|bin|inc)/">
            order allow,deny
            deny from all
            satisfy all
        </LocationMatch>


             Step F: save the file _THEN_ close the gedit / xed text editor __THEN!!__ at the temrinal window type this in and hit enter:

                  sudo service apache2 restart

Step 6: open a BRAND NEW browser tab and then goto your dokuwiki/install.php directory and it will take you to the doku wiki installation page

Step 7: Done!


I hope this helps someone, have a great day and good luck!
Avatar
andi (Administrator) #6
User title: splitbrain
Member since May 2006 · 3358 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by rbyte:
THE PROBLEM IS:: the permissions page (https://www.dokuwiki.org/install:permissions) doesn't explain how to use terminal to chmod

The page however explains how permissions work on a unix system and links to the manuals of chown and chmod. It should help you to *understand* what you are doing instead of just copying some commands.

Quote by rbyte:
chmod -R 777 data/ ; chmod -R 777 lib/ ; chmod -R 777 conf/

If you are setting up DokuWiki on your own computer, where you are superuser, it would make much more sense to change the owner of the files instead of bruteforcing permissions as wide open as possible.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
rbyte #7
User title: title_here
Member since May 2017 · 3 posts · Location: i'm_on_the_interet
Group memberships: Members
Show profile · Link to this post
Hello andi

I'm sorry if i didn't choose my words right as i love your wiki system and i never meant to offend you or anyone else, if i did then please accept my apologies.

I don't claim to be a linux nor apache expert and was trying to share my experience hoping it would help others but you bring up a good point on the user permissions vs. changing ownership.

I have a offline computer that I am setting up for non-internet connected usage and that's where i'm putting my dokuwiki.


For online dokuwiki installations, what should the user set the ownership to instead of chmoding 777 ?
Avatar
andi (Administrator) #8
User title: splitbrain
Member since May 2006 · 3358 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by rbyte:
For online dokuwiki installations, what should the user set the ownership to instead of chmoding 777 ?

The user the webserver or php process is running as.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
cziehr #9
Member since Jan 2011 · 466 posts · Location: 10119 Berlin
Group memberships: Members
Show profile · Link to this post
For Ubuntu, an so also Mint, open a terminal and type

sudo chown -R www-data:www-data /var/www/html/dokuwiki

Now the dokuwiki-folder is owned by your webserver, instead of giving chmod 777 on every folder
Avatar
jeffmcneill #10
Member since Jun 2018 · 4 posts
Group memberships: Members
Show profile · Link to this post
I find that occasionally the directory structure loses some part of its security settings and I use a script to overwrite. Does this security align with DokuWiki needs? In general this works for Apache and Nginx (which is the example user below):

chown -R nginx:nginx /usr/share/nginx/html
find /usr/share/nginx/html -type d -exec chmod 2775 {} \;
find /usr/share/nginx/html -type d -exec chmod g+s {} \;
find /usr/share/nginx/html -type f -exec chmod 0664 {} \;
Avatar
jmd #11
Member for a week · 1 post
Group memberships: Members
Show profile · Link to this post
I have just spent about an hour faffing around with this, so thought I would quickly share. In my case, I was moving the DokuWiki installation from our web host to an internal server, and had checked and double checked the owners, permissions etc.
In the end it turned out to be because SELinux was turned on.
To fix it, I ran the following commands:

setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux
sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config

HOWEVER I am no security expert and this is probably a bad idea if this is an internet facing server, so please use these commands with caution.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-12-14, 04:16:40 (UTC +01:00)