1

Topic: permissions issue

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.1
- Linux/BSD distribution name and version: Ubuntu 14.04.03 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? YES - Lifetime license
- Related log if you're reporting an issue:
====

hi there,

I did a silly thing - whilst changing the ownership of a directory, and whilst tired I put / and slipped on to the enter key.  After hitting ctrl-c as soon as a I realised I spent a happy hour or so fixing what ownership and permissions I could, and got my mailserver working again.

However I can't figure out why I cannot log into iredadmin-pro (1.9.2).  The log in page is fine, but when clicking enter then I get 'Internal server error' - not a standard Apache page.

I assume it's a permissions issue (ownership) - but I can't figure out where I should be looking.

/usr/share/apache2/iredadmin appears to all be owned as it should - and I don't think that the chown got that far before I stopped it.

clamAV is also refusing to play - but I'm less bothered about that right now - I'm going to move server soon, but I need to add a new user today.

Thanks for help,

John

----

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

2

Re: permissions issue

johnsjs wrote:

However I can't figure out why I cannot log into iredadmin-pro (1.9.2).  The log in page is fine, but when clicking enter then I get 'Internal server error' - not a standard Apache page.

Any related error in Apache log file (under /var/log/apache2/)?

3

Re: permissions issue

hi Zhang,

here are the logs when I click 'log in' with a valid user/pass.

The web address which fails is [myIP]/iredadmin/dashboard/checknew


[Wed Mar 09 15:38:39.388913 2016] [wsgi:error] [pid 31188] [remote [MyIP]:40221] Traceback (most recent call last):
[Wed Mar 09 15:38:39.388952 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Wed Mar 09 15:38:39.388957 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]     return self.handle()
[Wed Mar 09 15:38:39.388960 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Wed Mar 09 15:38:39.388963 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]     return self._delegate(fn, self.fvars, args)
[Wed Mar 09 15:38:39.388966 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
[Wed Mar 09 15:38:39.388970 2016] [wsgi:error] [pid 31188] [remote  [MyIP]2:40221]     return handle_class(cls)
[Wed Mar 09 15:38:39.388972 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
[Wed Mar 09 15:38:39.388994 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]     return tocall(*args)
[Wed Mar 09 15:38:39.388997 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/share/apache2/iredadmin/controllers/decorators.py", line 22, in proxyfunc
[Wed Mar 09 15:38:39.389000 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]     return func(self, *args, **kw)
[Wed Mar 09 15:38:39.389002 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/share/apache2/iredadmin/controllers/mysql/basic.py", line 246, in GET
[Wed Mar 09 15:38:39.389005 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]     removeQuarantinedInDays=settings.AMAVISD_REMOVE_QUARANTINED_IN_DAYS,
[Wed Mar 09 15:38:39.389008 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 199, in render_template
[Wed Mar 09 15:38:39.389010 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]     return jinja_env.get_template(template_name).render(context)
[Wed Mar 09 15:38:39.389013 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
[Wed Mar 09 15:38:39.389015 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]     return self.environment.handle_exception(exc_info, True)
[Wed Mar 09 15:38:39.389017 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
[Wed Mar 09 15:38:39.389020 2016] [wsgi:error] [pid 31188] [remote  [MyIP]2:40221]     reraise(exc_type, exc_value, tb)
[Wed Mar 09 15:38:39.389022 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]   File "/usr/share/apache2/iredadmin/libs/../templates/default/macros/general.html", line 1170, in template
[Wed Mar 09 15:38:39.389025 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]     {% macro display_per_user_wblist(values=[], htmlInputName, label) -%}
[Wed Mar 09 15:38:39.389027 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221] TemplateSyntaxError: non-default argument follows default argument

Many thanks

John

4

Re: permissions issue

johnsjs wrote:

[Wed Mar 09 15:38:39.389025 2016] [wsgi:error] [pid 31188] [remote  [MyIP]:40221]     {% macro display_per_user_wblist(values=[], htmlInputName, label) -%}

A known issue in old iRedAdmin-Pro release, please open file templates/default/macros/general.html, line 1170, find this line:

{% macro display_per_user_wblist(values=[], htmlInputName, label) -%}

Remove "=[]" (red text in code above), save your change. It should work fine now.

5

Re: permissions issue

Fabulous, thank you Zhang,

Well worth a cup of coffee.

I wonder why it suddenly became a problem?  Clearly not my ownership changing nonsense - but it's been working for months, and then suddenly developed this issue.

Anyway, all working now, thank you.

Cheers

John

6

Re: permissions issue

Did you upgrade package 'jinja2' or 'python-jinja2'?