-
Notifications
You must be signed in to change notification settings - Fork 11k
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
7.1.0 doesn't run as non-root while 7.0.0 does #34840
Comments
Thanks. I'll refer this to the devs. |
Hi, |
Hit the same thing in docker upgrading 7.0.3 to 7.1.0 |
Anyone seen this as well on 7.0.4 ? Subprocess stderr Download https://jsr.io/@std/cli/1.0.9_meta.json Subprocess stderr error: Permission denied (os error 13) (for '/app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/.deno-cache/deps/https/jsr.io/c29b640a904c999165944cb8fa91773b04e6aababb971a93737582c5ecdb16a3') |
Hmmm. I am wondering if this is OS related? Mine is with docker on CentOS 7 (which is due to get upgrade soon, but not just yet). Rocket is the only thing it runs. |
Back to 7.0.3 and all quiet...... |
Hey @reetp , I'm not entirely sure your last comments are directly related to the initial issue where, imo, the root cause is pretty clear and pinpoints to a transitive dependency Rocketchat < Meteor < useragent-ng, what do you think? |
You don't need to '@' me thanks. I read most stuff. Can you confirm your OS that you are using?
Possibly, but it may equally be a symptom of something else rather than the cause. Note I am no code guru, but I have triaged plenty of stuff here. So the first error I got with 7.1.0 was the same as yours.
I then backtracked fast to 7.0.4 as I didn't have time to mess about - I remember looking at perms/deno related stuff having insufficient perms in the container and hit the second issue which seems related - again, permissions issues in the container. I can also see various issues logged for containerd and suspect that is probably related. As soon as I went back to 7.0.3 they disappeared again. Something has changed/backported to 7.0.4 to match whatever happened in 7.1.0 Likely one of the 'fixes' here that were also in 7.1.0 https://github.com/RocketChat/Rocket.Chat/releases/tag/7.0.4 I vaguely remember seeing similar container permissions issues elsewhere some years back - when they updated cgroups or something and then the containers couldn't give the right perms. Feels very similar. I have asked the team about it. Let us know about your OS please. |
7.0.4 is running fine, same securityContext as usual:
It only breaks with 7.1.0+, which is concomitant with 3.0.4 Meteor upgrade as stated earlier.
Kubernetes version is v1.31.4 running on Ubuntu Ubuntu 22.04.4 LTS.
Thanks! |
meteor/meteor@d3d1b92 likely the source. |
Discussing what can be done. For now though, we do have #34162 this going, which will enable non-root runtime, but any uid setting other than 65533 will still be broken. |
ideally, we should be able to run Rocketchat with whatever non root uid we choose, especially in a Kubernetes/containerized environment. Moreover, the problem seems to be more on file permissions, than on effective user-id. |
Description:
After upgrading to 7.1.0, Rocketchat doesn't start anymore on Kubernetes when running as non root with the following securityContext:
Error thrown:
The root cause seems to be Meteor upgrade to 3.0.4 where the Meteor webapp component switched a dependency from
[email protected]
to[email protected]
For an unknown reason, useragent-ng's
/lib/regexps.js
is shipped with unix 0600 access mode:Steps to reproduce:
Expected behavior:
/app/bundle/programs/server/npm/node_modules/meteor/webapp/node_modules/useragent-ng/lib/regexps.js
to be 0644 mode like other files in/app/bundle/programs/server/npm/node_modules/meteor/webapp/node_modules/useragent-ng/lib
Actual behavior:
/app/bundle/programs/server/npm/node_modules/meteor/webapp/node_modules/useragent-ng/lib/regexps.js
is 0600 and make the container crash at start time when the container is run as non root userServer Setup Information:
Additional context
I understand this is not directly under your scope,
useragent-ng
being a transitive dependency of meteor/webapp, which is itself a dependency of rocketchat.However, since it directly affects rocketchat and prevent further upgrade in the current state, I believe you would like to know. Not sure how you can ask Meteor's developers to ask useragent-ng's developers to fix the situation.
FWIT, II created schmod/useragent-ng#6
Relevant logs:
The text was updated successfully, but these errors were encountered: