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

Correctly set settings-override.py permissions #16

Closed
lyz-code opened this issue Jun 16, 2020 · 5 comments
Closed

Correctly set settings-override.py permissions #16

lyz-code opened this issue Jun 16, 2020 · 5 comments
Assignees
Labels
bug Something is broken.

Comments

@lyz-code
Copy link
Contributor

lyz-code commented Jun 16, 2020

When creating the service with the helm chart, the following error is risen:

weblate.E027 	The path /app/data/settings-override.py is owned by different user, check your DATA_DIR settings.

I've seen that the file is mounted in the container with the following permissions:

-rw-r--r--  1 root    weblate     0 Jun 15 15:30 settings-override.py

While debugging this I've seen that the weblate user belongs to the root group though it doesn't have permissions to edit root owned files, wouldn't it be better if it didn't belong to that group?

weblate@weblate-547cf6f5b-pjwvz:/etc$ id
uid=1000(weblate) gid=1000(weblate) groups=1000(weblate),0(root),5(tty)
weblate@weblate-547cf6f5b-pjwvz:/etc$ echo "# hi" >> /etc/hosts
bash: hosts: Permission denied

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nijel
Copy link
Member

nijel commented Jun 16, 2020

It needs the root group, see WeblateOrg/docker#326 and moby/moby#31243 (comment)

@nijel nijel added the bug Something is broken. label Jun 16, 2020
@nijel
Copy link
Member

nijel commented Nov 9, 2020

And it doesn't seem to be possible to set ownership correctly, see kubernetes/kubernetes#2630

@marcelofabricanti
Copy link

Same here.

I've just installed from chart and got this error:
check stderr | CRITICALS: check stderr | ?: (weblate.E027) The path /app/data/settings-override.py is owned by a different user, check your DATA_DIR settings. check stderr | HINT: https://docs.weblate.org/en/weblate-4.5.1/admin/install.html#file-permissions check stderr |

/app/data owned by root and app is running on weblate user.

@nijel
Copy link
Member

nijel commented Mar 22, 2021

As mentioned before, this error is harmless. But it probably makes sense to exclude this particular file from the check...

@github-actions
Copy link

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

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

No branches or pull requests

3 participants