Skip to content

403 on Applications page, 500 on edit user page

I started a new vagrant box, and first upgraded all packages in it. Then I ran all the functional tests, and >30 of them failed.

I can access plinth, and log in as user "tester". The front page shows the "Enable some applications" message, but when I click the link I get 403 Forbidden.

If I try to edit the user, I get 500 error with this log:

[2018-06-24 14:31:05,984] axes.watch_login INFO     AXES: Successful login by {user: 'tester', ip: '10.0.2.2', user-agent: 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0', path: '/accounts/login/'}.
[2018-06-24 14:31:05,993] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/auth-pubtkt', 'generate-ticket', '--uid', 'tester', '--private-key-file', '/etc/apache2/auth-pubtkt-keys/privkey.pem', '--tokens', '']
[2018-06-24 14:31:06,170] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-user-groups', 'tester']
[2018-06-24 14:31:06,660] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-user-groups', 'tester']
[2018-06-24 14:31:07,105] django.request WARNING  Forbidden (Permission denied): /plinth/apps/
[2018-06-24 14:31:13,484] axes.watch_login INFO     AXES: Successful login by {user: 'tester', ip: '10.0.2.2', user-agent: 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0', path: '/accounts/login/'}.
[2018-06-24 14:31:13,500] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/auth-pubtkt', 'generate-ticket', '--uid', 'tester', '--private-key-file', '/etc/apache2/auth-pubtkt-keys/privkey.pem', '--tokens', '']
[2018-06-24 14:31:13,698] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-user-groups', 'tester']
[2018-06-24 14:31:14,202] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-user-groups', 'tester']
[2018-06-24 14:31:14,584] django.request WARNING  Forbidden (Permission denied): /plinth/apps/
[2018-06-24 14:31:21,121] axes.watch_login INFO     AXES: Successful login by {user: 'tester', ip: '10.0.2.2', user-agent: 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0', path: '/accounts/login/'}.
[2018-06-24 14:31:21,132] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/auth-pubtkt', 'generate-ticket', '--uid', 'tester', '--private-key-file', '/etc/apache2/auth-pubtkt-keys/privkey.pem', '--tokens', '']
[2018-06-24 14:31:21,302] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-user-groups', 'tester']
[2018-06-24 14:31:21,714] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-user-groups', 'tester']
[2018-06-24 14:31:22,060] django.request WARNING  Forbidden (Permission denied): /plinth/apps/
[2018-06-24 14:37:56,471] axes.watch_login INFO     AXES: Successful login by {user: 'tester', ip: '10.0.2.2', user-agent: 'Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0', path: '/accounts/login/'}.
[2018-06-24 14:37:56,484] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/auth-pubtkt', 'generate-ticket', '--uid', 'tester', '--private-key-file', '/etc/apache2/auth-pubtkt-keys/privkey.pem', '--tokens', '']
[2018-06-24 14:37:56,662] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-user-groups', 'tester']
[2018-06-24 14:37:59,118] django.request WARNING  Forbidden (Permission denied): /plinth/apps/
[2018-06-24 14:38:07,764] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-user-groups', 'tester']
[2018-06-24 14:38:10,081] django.request WARNING  Forbidden (Permission denied): /plinth/apps/
[2018-06-24 14:39:01,229] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/ssh', 'get-keys', '--username', 'tester']
[2018-06-24 14:39:01,397] plinth.actions INFO     Executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-group-users', 'admin']
[2018-06-24 14:39:01,560] plinth.actions ERROR    Error executing command - ['sudo', '-n', '/usr/share/plinth/actions/users', 'get-group-users', 'admin'], , Traceback (most recent call last):
  File "/usr/share/plinth/actions/users", line 389, in <module>
    main()
  File "/usr/share/plinth/actions/users", line 385, in main
    subcommand_method(arguments)
  File "/usr/share/plinth/actions/users", line 357, in subcommand_get_group_users
    users_info = output[1].split('=')[1].strip('\\n').split(',')
IndexError: list index out of range

[2018-06-24 14:39:01,560] django.request ERROR    Internal Server Error: /plinth/sys/users/tester/edit/
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/plinth/modules/users/views.py", line 100, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/views/generic/edit.py", line 236, in get
    return super(BaseUpdateView, self).get(request, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/views/generic/edit.py", line 174, in get
    return self.render_to_response(self.get_context_data())
  File "/usr/local/lib/python3.6/dist-packages/plinth/modules/users/views.py", line 49, in get_context_data
    context = super(ContextMixin, self).get_context_data(**kwargs)
  File "/usr/lib/python3/dist-packages/django/views/generic/edit.py", line 93, in get_context_data
    kwargs['form'] = self.get_form()
  File "/usr/lib/python3/dist-packages/django/views/generic/edit.py", line 45, in get_form
    return form_class(**self.get_form_kwargs())
  File "/usr/local/lib/python3.6/dist-packages/plinth/modules/users/forms.py", line 177, in __init__
    last_admin_user = get_last_admin_user()
  File "/usr/local/lib/python3.6/dist-packages/plinth/modules/users/__init__.py", line 115, in get_last_admin_user
    ['get-group-users','admin']
  File "/usr/local/lib/python3.6/dist-packages/plinth/actions.py", line 118, in superuser_run
    log_error=log_error)
  File "/usr/local/lib/python3.6/dist-packages/plinth/actions.py", line 190, in _run
    raise ActionError(action, output, error)
plinth.errors.ActionError: ('users', '', 'Traceback (most recent call last):\n  File "/usr/share/plinth/actions/users", line 389, in <module>\n    main()\n  File "/usr/share/plinth/actions/users", line 385, in main\n    subcommand_method(arguments)\n  File "/usr/share/plinth/actions/users", line 357, in subcommand_get_group_users\n    users_info = output[1].split(\'=\')[1].strip(\'\\\\n\').split(\',\')\nIndexError: list index out of range\n')
Edited by Joseph Nuthalapati