YunoHost-Apps / tandoor_ynh

Tandoor package for YunoHost
https://tandoor.dev
MIT License
3 stars 5 forks source link

media files not accessible #79

Closed ballinger closed 3 months ago

ballinger commented 3 months ago

Describe the bug

media files probably have the wrong user credentials / pictures and media are not displayed Screenshot_20240711_082424

Context

/var/www/tandoor/source# ls -l
total 128
-rw-rw----  1 tandoor www-data  2929 Jul  8 18:13 boot.sh
-rw-rw----  1 tandoor www-data  2669 Jul  8 18:13 CONTRIBUTERS.md
drwxrwx--- 16 tandoor www-data  4096 Jul 10 06:44 cookbook
-rw-rw----  1 tandoor www-data  1478 Jul  8 18:13 Dockerfile
drwxrwx---  8 tandoor www-data  4096 Jul  8 18:13 docs
-rw-rw----  1 tandoor www-data 36742 Jul  8 18:13 LICENSE.md
-rw-rw----  1 tandoor www-data   860 Jul  8 18:13 make_compile_messages.py
-rwxrwx---  1 tandoor www-data   539 Jul  8 18:13 manage.py
drwxr-xr-x  3 tandoor tandoor   4096 Jul 10 10:21 mediafiles
ls -l staticfiles/
total 108
drwxr-xr-x 5 tandoor tandoor  4096 Jul 10 06:45 admin
drwxr-xr-x 2 tandoor tandoor  4096 Jul 10 06:45 assets
drwxr-xr-x 2 tandoor tandoor  4096 Jul 10 06:45 css

chown tandoor:www-data mediafiles/ -R does not work all new files, inside mediafiles/ - created from the web interface sets the user to tandoor:tandoor

Steps to reproduce

  1. create new recipie
  2. drag image into pic placeholder and save
  3. image will be broken not accessible

Expected behavior

show pictures

Logs

no logs under /var/log/tandoor

ballinger commented 3 months ago

media issues


default install dir -> `/var/www/tandoor/source/mediafiles`

# user rights
changing the media dir + content to tandoor:www-data doesnt help
changing the systemctl usergroup to www-data doesnt help

# firefox console
GET
https://domain.org/media/recipes/f836c696-dfe8-4c1b-bed1-4e14f3f10231_138.jpg
[HTTP/1.1 404  0ms]
ballinger commented 3 months ago

nano /var/www/tandoor/.env

# If mediafiles are stored at a different location uncomment and change accordingly, MUST END IN /
# this is not required if you are just using a subfolder
# This can either be a relative path from the applications base path or the url of an external host
# MEDIA_URL=/media/
MEDIA_URL=https://domain.org:8097/source/media/
mubbelsberger commented 3 months ago

I've got the same problem and tried messing with the Recipes.conf.

But no success.

See my thread in the yunohost forum.

ericgaspar commented 3 months ago

closing with #80