Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't edit recipes #2788

Closed
update-freak opened this issue Dec 8, 2023 · 23 comments
Closed

Can't edit recipes #2788

update-freak opened this issue Dec 8, 2023 · 23 comments

Comments

@update-freak
Copy link

Tandoor Version

1.5.10

Setup

Docker / Docker-Compose

Reverse Proxy

Others (please state below)

Other

Synology Reverse Proxy

Bug description

I can not edit my recipes (there is no button or menu)
This effects imported ones and also new created ones (see screenshot).
Tested with current Chrome and Edge.

2023-12-08 11_14_02-Spätzle-Pfanne - Profil 1 – Microsoft​ Edge

Setup files:
Recipes.conf.txt
stack.env.txt
compose.txt

Relevant logs

No response

@smilerz
Copy link
Collaborator

smilerz commented Dec 8, 2023

Have you cleared your cache? Are there errors in the logs or console?

@update-freak
Copy link
Author

Yes, I also tried to clear cache.
Here are the logs:

Tandoor_logs.txt
Tandoor-DB_logs.txt
Tandoor-NGINX_logs.txt

@smilerz
Copy link
Collaborator

smilerz commented Dec 8, 2023

your permissions on disk are incorrect.

PermissionError: [Errno 13] Permission denied: '/opt/recipes/cookbook/static/django_js_reverse/reverse.js'

@update-freak
Copy link
Author

Ok thanks. How can I correct this permission error?

@smilerz
Copy link
Collaborator

smilerz commented Dec 8, 2023

Change the permissions on whatever host this volume is on to match the user that the container is running as.

  tandoor:
    image: vabene1111/recipes:latest
    container_name: Tandoor
    user: 1026:100
    volumes:
      - /volume1/docker/tandoor/staticfiles:/opt/recipes/staticfiles

FWIW I'm not 100% sure that changing the user that Tandoor is running as is stable.

@update-freak
Copy link
Author

Thanks.
Ok, that's strange because my docker compose already contains user: 1026:100.

But I found something out:
I tried it now also with v1.5.9 (clean install => removed existing files) --> Here I can edit the recipes
2023-12-08 16_16_01-Suchen
(screenshot from v1.5.9)
In v1.5.10 (clean install), I can not edit the recipes

Here the logs from v1.5.9 to compare:
Tandoor_logs-1.5.9.txt
Tandoor-DB_logs.1.5.9.txt
Tandoor-NGINX_logs.1.5.9.txt

@smilerz
Copy link
Collaborator

smilerz commented Dec 8, 2023

The compose does not change the permissions on disk, you have to manually change it at the OS level.

You can edit in the old version because the staticfiles exist for that version.

@update-freak
Copy link
Author

I tried to give the access to the user "Everyone" (Reading + Writing) for the tandoor-folder (and all the folders/files below). This did not work.
But the folder /opt/recipes/cookbook is not mapped on the Synology NAS, so how is this connected to the permissions on Synology NAS?

@smilerz
Copy link
Collaborator

smilerz commented Dec 8, 2023

/volume1/docker/tandoor/staticfiles is on Synology. After changing permissions did you restart the container? If so are you still getting the same error?

@update-freak
Copy link
Author

ah ok, yes /volume1/docker/tandoor/staticfiles is on Synology.
Jop, I also tried it with a restart of the container, but same problem.

@smilerz
Copy link
Collaborator

smilerz commented Dec 8, 2023

If the logs are still reporting a permissions error then permissions aren't set correctly - I don't have a synology so can't troubleshoot it. But I suspect that your user setting on the container is causing the problem.

@update-freak
Copy link
Author

update-freak commented Dec 8, 2023

ok, no problem.
For me it's still strange that for v1.5.9 I have the same error PermissionError: [Errno 13] Permission denied: '/opt/recipes/cookbook/static/django_js_reverse/reverse.js' (see logs above) and there it works

@ctrlaltdelete007
Copy link

Same here, version 1.5.9 is working, with latest version i also cannot edit the recipes, because the button is missing.

@smilerz
Copy link
Collaborator

smilerz commented Dec 8, 2023

Same here, version 1.5.9 is working, with latest version i also cannot edit the recipes, because the button is missing.

It works because the files are current - it can't write, but they are already the version that you need.

@update-freak
Copy link
Author

Do you see the cause of the problem from that permission screenshots

tandoor
tandoor2

@smilerz
Copy link
Collaborator

smilerz commented Dec 8, 2023

Only the whatever user is greyed out has write access - the group and everyone else is read only. Note - the tandoor container runs as root so the container can't read that file (unless you've obscured the root user)

image

@update-freak
Copy link
Author

Found a solution.
When I don't use user: 1026:100 in the docker compose I can edit the recipes and don't get the error in the logs.
So from my side this issue could be closed.

@mathroule
Copy link

mathroule commented Dec 16, 2023

Found a solution. When I don't use user: 1026:100 in the docker compose I can edit the recipes and don't get the error in the logs. So from my side this issue could be closed.

I had the same issue, indeed removing the user from the docker compose for the tandoor container did the trick. Thanks!

@mathieu-lemay
Copy link

Removing the user from the docker compose file works, but it would be nice to be able to run it with a regular user and not root

@update-freak
Copy link
Author

Indeed would be nice to be able to use the non root user

@mc-knife
Copy link

facing the same issue with tandoor as an yunohost app, see my description and logs of the issue in yunohost forum. one strange thing: tandoor 1.5.10 was still working. editing broke with update to 1.5.11
i would appreciate getting editing feature back. i like editing ;-)

@smilerz
Copy link
Collaborator

smilerz commented Jan 31, 2024

facing the same issue with tandoor as an yunohost app, see my description and logs of the issue in yunohost forum. one strange thing: tandoor 1.5.10 was still working. editing broke with update to 1.5.11 i would appreciate getting editing feature back. i like editing ;-)

If you are unable to edit it is because your app is deployed incorrectly. To correct this issue please open a new issue and supply all of the requested details. If it is because you have changed the container to run as a non-root user this is unsupported and you will need to change it back.

@mc-knife
Copy link

thanks for your quick reply @smilerz and your suggestion to check yunohost integration of the app. i try to get support for that possible deployment failure back in the yunohost forum. let us see if something happens there. will let you know here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants