-
Notifications
You must be signed in to change notification settings - Fork 133
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
Cannot write into node_modules directory #2237
Comments
We have been able to use |
This seems like unintended bahavior to me as well; adding it to our project board. |
Any updates here? I think this has got even worse as the directories now have
I would like to know if there is any way how to configure it, when building a KNative function (or during any other lifecycle step), so the owner stays as |
When container starts up, we need to generate some additional code for specific library, that's located within
node_modules
(utilizing "prestart" script inpackage.json
).After version 1.12.0, this is not possible as the directory does not seem writable for the running user. This used to work with version 1.11.0 and bellow.
After some debugging we have found out, that the ownership of the files have changed, which does not allow the running user to write into the directories.
This is output of
id
andls -la /layers
commands when using v1.11.0:uid=1000(cnb) gid=1000(cnb) groups=1000(cnb)
With v1.12.0 and above, we get the following output with different ownership (and uid of cnb user):
uid=1002(cnb) gid=1000(cnb) groups=1000(cnb)
It seems that the related changes have been done as part of #1911.
We have also tried to utilize KNative security context and
"runAsUser": 1001
, but didn't work either. Is this expected behaviour? Is there anything else we are missing in our configuration? Thanks.The text was updated successfully, but these errors were encountered: