Skip to content

snapshot: error during configuration

On the Snapshot configure page, I click "Update setup", without making any changes. I get a 500 error page with this log:

[2018-04-08 18:01:53,306] plinth.setup INFO Running setup for modules, essential - True, selected modules - None [2018-04-08 18:01:53,314] plinth.setup INFO Setup thread finished. [2018-04-08 18:05:48,185] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/snapshot', 'get-config'] [2018-04-08 18:05:54,389] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/snapshot', 'get-config'] [2018-04-08 18:05:54,517] django.request ERROR Internal Server Error: /plinth/sys/snapshot/ 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/local/lib/python3.6/dist-packages/plinth/modules/snapshot/views.py", line 53, in index update_configuration(request, status, form.cleaned_data) File "/usr/local/lib/python3.6/dist-packages/plinth/modules/snapshot/views.py", line 115, in update_configuration subprocess.run(command, check=True) File "/usr/lib/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['snapper', 'set-config', 'TIMELINE_CREATE=yes', 'TIMELINE_LIMIT_HOURLY=10', 'TIMELINE_LIMIT_DAILY=3', 'TIMELINE_LIMIT_WEEKLY=2', 'TIMELINE_LIMIT_MONTHLY=2', 'TIMELINE_LIMIT_YEARLY=0', 'NUMBER_MIN_AGE=1296000']' returned non-zero exit status 1.

My guess is that the snapper command is being called without root privileges.