Re: 500 server error - file permissions

8 views
Skip to first unread message

Christian Lawson-Perfect

unread,
May 10, 2022, 7:20:41 AM5/10/22
to numbas...@googlegroups.com
What user are the LTI processes running as? If you use the supervisor config from the installation instructions, it's www-data. Is www-data in the numbas_lti group, and does that directory have group write permission?

On Tue, 10 May 2022 at 12:18, 'Tom Salyers' via Numbas Users <numbas...@googlegroups.com> wrote:
Hi, all. 

I've got a couple of our learning technologists testing an upgraded Numbas LTI provider 3.0 version on one of our systems, and they're reporting a 500 internal server error when trying to upload a ZIP file with an exam in it. Here's the main error I'm seeing in /var/log/supervisor/numbas_lti_daphne_stderr.log:

2022-05-06 12:10:18,028 ERROR /opt/numbas_lti_python/lib/python3.8/site-packages/django/utils/log.py: Internal Server Error: /resource/31/create_exam
Traceback (most recent call last):

[dozens of lines of Django call stack omitted]

  File "/opt/numbas_lti_python/lib/python3.8/site-packages/django/core/files/storage.py", line 274, in _save
    fd = os.open(full_path, self.OS_OPEN_FLAGS, 0o666)
PermissionError: [Errno 13] Permission denied: '/srv/numbas-lti-media/exams/exam-128649-cat-questions.zip'

I've checked,  and that directory and its files are all owned by the numbas_lti user, so I wouldn't think there'd be a permissions problem. I have a feeling, though, that I'm missing something that should be obvious. Anyone have any ideas/advice? Thanks in advance. 

--
Tom Salyers

--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/numbas-users/bbcdd66d-52a5-47a8-b870-b1256332639cn%40googlegroups.com.

Tom Salyers

unread,
May 24, 2022, 8:58:09 AM5/24/22
to Numbas Users
Hi, Christian. 

Sorry for the delay--I was on holiday, then spent the next week getting caught up. The www-data user was/is in the numbas_lti group, but it looks like the directory didn't have group write permissions somehow. I've fixed that and asked our technologists to retest. Thanks for the pointer. 

--
Tom Salyers 

Reply all
Reply to author
Forward
0 new messages