1

Topic: When logging into the admin portal I get 403 forbidden

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Centos 6.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx):Apache
- Manage mail accounts with iRedAdmin-Pro?  iRedAdmin
- Related log if you're reporting an issue: See below
====
Hi,

When logging into https://mail.mydomain.com/iredadmin/ I get "Forbidden You don't have permission to access /iredadmin/ on this server."

I installed the server last year sometime and the admin portal worked at that time but since I rarely add users, I do not know when it quit. SOGo and roundcube wrok as expected.

I have the following in the httpd ssl log:

[Wed Feb 10 10:47:23 2016] [error] [client 192.168.0.3] Directory index forbidden by Options directive: /var/www/iredadmin/

(newman pts3) # cat /etc/httpd/conf.d/iredadmin.conf
WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess iredadmin user=iredadmin threads=15
WSGIProcessGroup iredadmin

AddType text/html .py

Alias /iredadmin "/var/www/iredadmin/"
<Directory /var/www/iredadmin/>
    Order allow,deny
Allow from all
</Directory>
(newman pts3) #

Webroot permissions look like the following:
(newman pts4) # la /var/www/
total 32
drwxr-xr-x.  8 root      root      4096 Dec 15 10:51 .
drwxr-xr-x. 20 root      root      4096 Jul  3  2015 ..
drwxr-xr-x.  2 root      root      4096 Dec 15 10:51 cgi-bin
drwxr-xr-x.  3 root      root      4096 Dec 16 11:22 error
drwxr-xr-x.  2 root      root      4096 Dec 15 10:51 html
drwxr-xr-x.  3 root      root      4096 Dec 16 11:22 icons
lrwxrwxrwx.  1 root      root        24 Jul  3  2015 iredadmin -> /var/www/iRedAdmin-0.4.2
dr-xr-xr-x.  9 iredadmin iredadmin 4096 Jul  4  2015 iRedAdmin-0.4.2
lrwxrwxrwx.  1 root      root        28 Jul  3  2015 roundcubemail -> /var/www/roundcubemail-1.1.1
drwxr-xr-x. 12 root      root      4096 Jul  3  2015 roundcubemail-1.1.1
(newman pts4) # la /var/www/iredadmin/
total 100
dr-xr-xr-x.  9 iredadmin iredadmin  4096 Jul  4  2015 .
drwxr-xr-x.  8 root      root       4096 Dec 15 10:51 ..
-r-xr-xr-x.  1 iredadmin iredadmin    49 May 14  2015 AUTHORS
-r-xr-xr-x.  1 iredadmin iredadmin  6265 May 14  2015 ChangeLog
dr-xr-xr-x.  6 iredadmin iredadmin  4096 Jul  3  2015 controllers
dr-xr-xr-x.  3 iredadmin iredadmin  4096 Jul  3  2015 docs
dr-xr-xr-x. 18 iredadmin iredadmin  4096 Jul  3  2015 i18n
-r-xr-xr-x.  1 iredadmin iredadmin   402 May 14  2015 iredadmin.py
dr-xr-xr-x.  6 iredadmin iredadmin  4096 Jul  4  2015 libs
-r-xr-xr-x.  1 iredadmin iredadmin 18092 May 14  2015 LICENSE
-r-xr-xr-x.  1 iredadmin iredadmin   439 May 14  2015 README
-r--------.  1 iredadmin iredadmin  4069 Jul  3  2015 settings.py
-r--------.  1 root      root       1519 Jul  4  2015 settings.pyc
-r-xr-xr-x.  1 iredadmin iredadmin  4558 May 14  2015 settings.py.ldap.sample
-r-xr-xr-x.  1 iredadmin iredadmin  3921 May 14  2015 settings.py.mysql.sample
-r-xr-xr-x.  1 iredadmin iredadmin  3904 May 14  2015 settings.py.pgsql.sample
dr-xr-xr-x.  4 iredadmin iredadmin  4096 Jul  3  2015 static
dr-xr-xr-x.  3 iredadmin iredadmin  4096 Jul  3  2015 templates
dr-xr-xr-x.  2 iredadmin iredadmin  4096 Jul  4  2015 tools
(newman pts4) #

Can someone give me an idea where to look to resolve this problem?

Regards

Tom

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: When logging into the admin portal I get 403 forbidden

Apache config and file permission looks just fine.

Do you have settings like below in /etc/httpd/conf.d/ssl.conf?

Alias /iredadmin/static "..."
WSGIScriptAlias /iredadmin "..."

3

Re: When logging into the admin portal I get 403 forbidden

ZhangHuangbin wrote:

Apache config and file permission looks just fine.

Do you have settings like below in /etc/httpd/conf.d/ssl.conf?

Alias /iredadmin/static "..."
WSGIScriptAlias /iredadmin "..."

Thanks for the response. I have the following in ssl.conf:

Alias /cluebringer "/usr/share/cluebringer/webui/"
Alias /iredadmin/static "/var/www/iredadmin/static/"
WSGIScriptAlias /iredadmin "/var/www/iredadmin/iredadmin.py/"
Alias /mail "/var/www/roundcubemail/"
Alias /awstats/icon "/usr/share/awstats/wwwroot/icon/"
Alias /awstatsicon "/usr/share/awstats/wwwroot/icon/"
ScriptAlias /awstats "/usr/share/awstats/wwwroot/cgi-bin/"

Regards,

Tom

4

Re: When logging into the admin portal I get 403 forbidden

File /etc/httpd/conf.d/iredadmin.conf is same as iRedMail default settings. No directive "DirectoryIndex" required, but not sure why Apache complains "Directory index forbidden by Options directive: /var/www/iredadmin/".

You can try to add "DirectoryIndex iredadmin.py" inside <Directory> for testing. but i doubt it will work for you.