1

I have a server running on BBQLinux latest stable release, installed four days ago with pretty much nothing else installed or configured. I followed the official guide to install Adminer, and no matter what I do, I keep getting a 403 when trying to access it. Configuration is as follows:

uname

Linux cpu 4.7.6-1-ARCH #1 SMP PREEMPT Fri Sep 30 19:28:42 CEST 2016 x86_64 GNU/Linux
  • Permissions inside /usr/share/webapps/adminer are 644 and its parent directories 744
  • There is no other index.html nor index.php

httpd.conf

...
DocumentRoot "/srv/http"
<Directory "/srv/http">
     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted
</Directory>
Include conf/extra/httpd-adminer.conf
...

httpd-adminer.conf

Alias /adminer "/usr/share/webapps/adminer"
<Directory "/usr/share/webapps/adminer">
    AllowOverride All
    Options FollowSymlinks
    Order allow,deny
    Require all granted
</Directory>

-

me@cpu /srv/http % ls -la
total 12
drwxr-xr-x 3 root root 4096 Oct 18 22:02 .
drwxr-xr-x 4 root root 4096 Sep 30  2015 ..
lrwxrwxrwx 1 root root   26 Oct 18 22:02 adminer -> /usr/share/webapps/adminer

The soft link was added as a measure of attempting things to work

/var/log/httpd/access_log

::1 - - [18/Oct/2016:22:06:31 -0500] "GET /adminer/ HTTP/1.1" 403 985
::1 - - [18/Oct/2016:22:09:06 -0500] "GET /adminer/ HTTP/1.1" 403 985
::1 - - [18/Oct/2016:22:12:13 -0500] "GET /adminer/ HTTP/1.1" 403 985
::1 - - [18/Oct/2016:22:12:15 -0500] "GET /adminer/ HTTP/1.1" 403 985
::1 - - [18/Oct/2016:22:19:25 -0500] "GET / HTTP/1.1" 200 694
::1 - - [18/Oct/2016:22:19:25 -0500] "GET /icons/blank.gif HTTP/1.1" 304 -
::1 - - [18/Oct/2016:22:19:25 -0500] "GET /icons/folder.gif HTTP/1.1" 304 -
::1 - - [18/Oct/2016:22:19:28 -0500] "GET /fcgid-bin/ HTTP/1.1" 200 902
::1 - - [18/Oct/2016:22:19:37 -0500] "GET /adminer/ HTTP/1.1" 403 996
::1 - - [18/Oct/2016:22:20:51 -0500] "GET /adminer/ HTTP/1.1" 403 996
::1 - - [18/Oct/2016:22:22:09 -0500] "GET /adminer/index.php HTTP/1.1" 403 982
::1 - - [18/Oct/2016:22:34:30 -0500] "GET /adminer/ HTTP/1.1" 403 996
::1 - - [18/Oct/2016:22:34:31 -0500] "GET /adminer/ HTTP/1.1" 403 996
::1 - - [18/Oct/2016:22:34:40 -0500] "GET /adminer/ HTTP/1.1" 403 996
::1 - - [18/Oct/2016:22:35:19 -0500] "GET /adminer/ HTTP/1.1" 403 996
::1 - - [18/Oct/2016:22:35:20 -0500] "GET /adminer/ HTTP/1.1" 403 996
::1 - - [18/Oct/2016:22:48:11 -0500] "GET /adminer/ HTTP/1.1" 403 996

/var/log/httpd/access_log

[Tue Oct 18 22:34:30.221749 2016] [core:crit] [pid 24251] (13)Permission denied: [client ::1:41886] AH00529: /usr/share/webapps/adminer/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/usr/share/webapps/adminer/' is executable
[Tue Oct 18 22:34:31.178160 2016] [core:crit] [pid 24251] (13)Permission denied: [client ::1:41886] AH00529: /usr/share/webapps/adminer/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/usr/share/webapps/adminer/' is executable
[Tue Oct 18 22:34:40.682838 2016] [core:crit] [pid 24252] (13)Permission denied: [client ::1:42240] AH00529: /usr/share/webapps/adminer/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/usr/share/webapps/adminer/' is executable
[Tue Oct 18 22:35:19.106504 2016] [access_compat:error] [pid 24253] [client ::1:43458] AH01797: client denied by server configuration: /usr/share/webapps/adminer/
[Tue Oct 18 22:35:20.131063 2016] [access_compat:error] [pid 24253] [client ::1:43458] AH01797: client denied by server configuration: /usr/share/webapps/adminer/    
[Tue Oct 18 22:48:05.459171 2016] [mpm_prefork:notice] [pid 24001] AH00173: SIGHUP received.  Attempting to restart
[Tue Oct 18 22:48:05.481813 2016] [mpm_prefork:notice] [pid 24001] AH00163: Apache/2.4.23 (Unix) PHP/7.0.12 configured -- resuming normal operations
[Tue Oct 18 22:48:05.481864 2016] [core:notice] [pid 24001] AH00094: Command line: '/usr/bin/httpd'
[Tue Oct 18 22:48:11.181295 2016] [access_compat:error] [pid 28506] [client ::1:39946] AH01797: client denied by server configuration: /usr/share/webapps/adminer/

Any ideas? Thanks

Chisko
  • 111
  • 1
  • 5
  • You said: "Permissions inside /usr/share/webapps/adminer are 644 and its parent directories 744" So fix the permissions. – Michael Hampton Oct 19 '16 at 06:32
  • 1
    In addition to the permissions Michael pointed out, you can also get a 403 error when no DirectoryIndex is present and check for .htaccess files. Also you have both created a symbolic link in your document root and set `FollowSymlinks` and you also set `Alias /adminer ...` as well. Normally you'd only need one or the other. – HBruijn Oct 19 '16 at 07:20
  • @MichaelHampton excuse my ignorance, but everything I've read so far says those permissions are fine. Mind specifying which should I set? – Chisko Oct 19 '16 at 14:51
  • 744 is so obviously wrong that anything you read that contains it should be entirely suspect. – Michael Hampton Oct 19 '16 at 14:55
  • 1
    G-sus-crhist. Can you please say what permissions should I set in order for my server to work or are you going to continue shaming me? – Chisko Oct 19 '16 at 14:59

1 Answers1

0

Works now. Thanks to @HBrujin. I only had to comment-out the alias on the configuration since I already had a symlink

httpd-adminer.conf

#Alias /adminer "/usr/share/webapps/adminer"

Please note that it was not commented, and it still didn't work before creating the symlink.

Hope this helps somebody.

Chisko
  • 111
  • 1
  • 5