Permissions error again
Can we get a deep dive into the permissions for these docker containers? I spend so much time to figure out permissions errors with this repo that I am almost getting ready to abandon it. I shouldnt have to chmod 777 for read access for these containers.
ERROR 2024-09-17 08:26:37,326 log Internal Server Error: /en/software/features
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/usr/local/lib/python3.10/dist-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/wger/src/wger/software/views.py", line 67, in features
return render(request, 'features.html', context)
File "/usr/local/lib/python3.10/dist-packages/django/shortcuts.py", line 24, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/usr/local/lib/python3.10/dist-packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
File "/usr/local/lib/python3.10/dist-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/usr/local/lib/python3.10/dist-packages/django/template/base.py", line 175, in render
return self._render(context)
File "/usr/local/lib/python3.10/dist-packages/django/template/base.py", line 167, in _render
return self.nodelist.render(context)
File "/usr/local/lib/python3.10/dist-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/usr/local/lib/python3.10/dist-packages/django/template/base.py", line 1005, in
wger@023e2a8bbd94:~$ ls -l total 28 drwxr-xr-x 2 wger wger 4096 Sep 16 15:25 beat drwxr-xr-x 2 wger wger 4096 Sep 16 15:25 db -rwxr-xr-x 1 root root 2304 Sep 16 15:20 entrypoint.sh drwxr-sr-x 2 root root 4096 Sep 17 14:24 media drwxr-xr-x 1 wger wger 4096 Sep 16 15:23 src drwxr-sr-x 2 root root 4096 Sep 17 14:24 static
@rolandgeider Any update on this issue or a proposed fix?
hi! When you start the container the static files are copied over to the static files folder, these have the same owner as the rest of the files in the application and probably don't make problems. Then, when you start up the application, the static files are compressed into one, and this happes by the server process, so this might be the reason. I added a flag so that this compression doesn't happen, can you try to set COMPRESS_ENABLED=False and see if it helps?
It did not. Nuked the file system and started over. No change. Still cant find static images. One of several errors that are the same
Not Found: /static/images/icons/flags/hr.svg WARNING 2024-10-29 10:11:38,122 log Not Found: /static/images/icons/flags/hr.svg
Running in production mode, running collectstatic now
INFO 2024-10-29 10:23:59,213 apps AXES: BEGIN version 7.0.0, blocking by ip_address
Traceback (most recent call last):
File "/home/wger/src/manage.py", line 24, in
Running in production mode, running collectstatic now
just wanted to suggest running collectstatic. Aren't there any other errors after that? Something useful like "could not write to folder" or such
Otherwise is there a reason you can't use volumes? Everything works there
just wanted to suggest running collectstatic. Aren't there any other errors after that? Something useful like "could not write to folder" or such
I have set to run the downloads of exercises etc set to run at startup with thats what you mean. No other errors. static and media are both empty
Otherwise is there a reason you can't use volumes? Everything works there
I mount the volume directly into the container. its easier for me to maintain because my config it on an external HD and no my RPI drive.
drwxr-sr-x 2 root root 4096 Oct 29 10:42 media drwxr-sr-x 2 999 root 4096 Oct 29 10:42 redis-data drwxr-sr-x 2 root root 4096 Oct 29 10:42 static
I dont even have a 999 on my system