-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Files are made group readable on the data volume #2439
Comments
I've just looked at a few containers and the private key as owner only access in all of them. Didn't you copy the keys from another system, not preserving the permissions? Or maybe the file system you use doesn't preserve permissions? Weblate internally uses |
This issue has been marked as a question by a Weblate team member. Why? Because it belongs more to the professional Weblate Care or community Discussions than here. We strive to answer these reasonably fast here, too, but purchasing the support subscription is more responsible and faster for your business. And it makes Weblate stronger as well. Thanks! In case your question is already answered, making a donation is the right way to say thank you! |
I don't think it's the underlying filesystem. The persistent volume is backed by a local zfs volume and other files seem to retain their permissions. Also we had to restart the pod (i.e. actually the whole node) and after the restart the file permissions for that file were messed up again. Also some time ago we replaced the ssh key with the a new one (different cipher). The old key remains on the volume and was not affected by the restart. Aside from ssh, which processes interact with the key file? |
There should be nothing else interacting with the file. |
Ok, I just checked again:
|
This issue has been automatically marked as stale because there wasn’t any recent activity. It will be closed soon if no further action occurs. Thank you for your contributions! |
I have no clue why this has been introduced initially, but it makes sense to apply the same logic for both supported key types. See https://github.com/WeblateOrg/weblate/issues/11781
I created a file id_xyz and change its permissions to 600. After restarting the pod, it looks like this: -rw-rw-r-- 1 weblate weblate 58 Mar 2 00:56 config Seems to me like something adds rw rights on group level if none are present. However files like id_ed25519.pub keep their read permissions for 'other' |
Does it happen anywhere in the volume, or just in the SSH keys? |
Just created a test file in /app/data and it is affected as well: The restart changed the permissions from 600 to 660 |
I've adjusted the issue title to refect this, but I have no clue where this could be coming from. As there is no such code in Weblate container it makes me think it has to be something in your Docker environment causing this. |
This issue has been automatically marked as stale because there wasn’t any recent activity. It will be closed soon if no further action occurs. Thank you for your contributions! |
Ok, so far I tracked it down to be probably related to the volume provisioner in K8s because we migrated the Weblate instance to another cluster with a different volume provisioner. However other pods which also use the same volume provisioner don't seem to show the same behaviour. Therefore I think it might be a combination of the PV and the base image that weblate is using... |
Have you tried creating files with 0600 permissions in the other volumes? There are not really many situations when this is needed, and lack of such files might be the reason you don't see issues in other containers. Weblate is based on python image, which at last is based on debian image. I guess somebody would notice if these images would have some such issues. What volume provisioner was used on the problematic cluster? |
That's actually what I did: I created a new file on such a PV, changed permissions to 0600 and deleted the pod (so the underlying ReplicationSet would create a new one). Afterwards the permissions were still the same. |
Maybe it's related to the Weblate container not running as root? |
Describe the issue
Problem running 'git remote update gerrit'
Fetching gerrit
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0660 for '/app/data/ssh/id_ed25519' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/app/data/ssh/id_ed25519": bad permissions
weblate@gerrit.caperwhite.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: could not fetch gerrit
Errors running git rebase --abort
fatal: No rebase in progress?
(1)
I already tried
Steps to reproduce the behavior
Expected behavior
Screenshots
Exception traceback
No response
How do you run Weblate?
Docker container
Weblate versions
Weblate deploy checks
Additional context
No response
The text was updated successfully, but these errors were encountered: