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

docker images: chmod libwasmvm* 0644 so non-root user can load them #148

Open
jmo-staked opened this issue Jun 28, 2024 · 0 comments
Open

Comments

@jmo-staked
Copy link

jmo-staked commented Jun 28, 2024

inside the docker images the injectived binary is executable by any user as mode 0755, which is great to be able create/run as a non-root user (container runs as root by default).

however the shared libs in /usr/lib are readable only by root mode 0600, causing a library loading error when a non-root user runs injectived version

is it possible to give the wasm shared libs a mode of 0644 to allow a non-root user to load them?

$ ll /usr/local/bin
total 130596
drwxr-xr-x 1 root root      4096 Jan 22 07:37 ./
drwxr-xr-x 1 root root      4096 Jan 10 00:00 ../
-rwxr-xr-x 1 root root   8908604 Jan 22 07:37 gex*
-rwxr-xr-x 1 root root 124810736 Jan 22 07:36 injectived*
$ ll /usr/lib
total 22440
drwxr-xr-x  1 root root     4096 Jan 22 07:37 ./
drwxr-xr-x  1 root root     4096 Jan 10 00:00 ../
drwxr-xr-x  5 root root     4096 Jan 10 00:00 apt/
drwxr-xr-x  3 root root     4096 May 25  2023 dpkg/
drwxr-xr-x  2 root root     4096 Jan 10 00:00 init/
-rw-------  1 root root 11526856 Oct 31  2023 libwasmvm.aarch64.so
-rw-------  1 root root 11368968 Oct 31  2023 libwasmvm.x86_64.so

workaround:
for anyone hitting this, in my custom Dockerfile I add this RUN statement

RUN find /usr/lib -maxdepth 1 -type f -exec chmod 0644 {} \;
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

1 participant