I'm running an Apache2 server on Raspbian that serves an instance of DokuWiki, however I seem to be running into permissions issues.
For some reason all my directories and the files in them are accessible publicly on the server. All the directories are recursively set to chmod 770, I even tried 700, yet I can still access them in the browser. I previously had it set up where everything was owned by my user, pi, but even when putting everything under the www-data user, I can't get it to work.
There are .htaccess files that come with DokuWiki that are also supposed to prevent access but those are not functioning either. I've enabled mod-rewrite and AllowOverride All, still no luck...
Example of my permissions setup:
pi@piserver:/var/www/html $ ls -al
total 96
drwxr-xr-x 9 www-data www-data 4096 May 24 03:15 .
drwxr-xr-x 3 root root 4096 May 24 02:21 ..
drwxrwx--- 2 www-data www-data 4096 May 24 02:39 bin
drwxrwx--- 2 www-data www-data 4096 May 24 03:02 conf
-rw-r--r-- 1 www-data www-data 18092 May 24 02:39 COPYING
drwxrwx--- 12 www-data www-data 4096 May 24 02:39 data
-rw-r--r-- 1 www-data www-data 3674 May 24 02:39 doku.php
-rw-r--r-- 1 www-data www-data 19372 May 24 02:39 feed.php
-rwxr-x--- 1 www-data www-data 66 May 24 03:15 .htaccess
drwxrwxr-x 6 www-data www-data 4096 May 24 02:39 inc
-rw-r--r-- 1 www-data www-data 182 May 24 02:39 index.php
drwxrwxr-x 8 www-data www-data 4096 May 24 02:39 lib
drwxrwx--- 2 www-data www-data 4096 May 24 03:03 old
-rw-r--r-- 1 www-data www-data 306 May 24 02:39 README
drwxrwx--- 5 www-data www-data 4096 May 24 02:40 vendor
-rw-r--r-- 1 www-data www-data 23 May 24 02:39 VERSION
pi@piserver:/var/www/html/data $ ls -al
total 100
drwxrwx--- 12 www-data www-data 4096 May 24 02:39 .
drwxr-xr-x 9 www-data www-data 4096 May 24 03:15 ..
drwxrwx--- 2 www-data www-data 4096 May 24 03:08 attic
drwxrwx--- 16 www-data www-data 4096 May 24 03:08 cache
-rwxrwx--- 1 www-data www-data 20836 May 24 02:39 deleted.files
-rwxrwx--- 1 www-data www-data 32 May 24 02:39 _dummy
-rwxrwx--- 1 www-data www-data 31 May 24 02:39 .htaccess
drwxrwx--- 2 www-data www-data 4096 May 24 03:08 index
drwxrwx--- 2 www-data www-data 4096 May 24 03:08 locks
drwxrwx--- 3 www-data www-data 4096 May 24 02:39 media
drwxrwx--- 2 www-data www-data 4096 May 24 02:39 media_attic
drwxrwx--- 2 www-data www-data 4096 May 24 02:39 media_meta
drwxrwx--- 3 www-data www-data 4096 May 24 03:08 meta
drwxrwx--- 4 www-data www-data 4096 May 24 03:08 pages
-rwxrwx--- 1 www-data www-data 6516 May 24 02:39 security.png
-rwxrwx--- 1 www-data www-data 12093 May 24 02:39 security.xcf
drwxrwx--- 2 www-data www-data 4096 May 24 02:39 tmp
My .htaccess files look like this:
order allow,deny
deny from all
What exactly am I doing wrong here?
192.168.1.99 - - [24/May/2016:04:24:41 +0000] "GET /data/ HTTP/1.1" 200 903 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0"
.htaccess
files enabled?