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

/var/runtime/bootstrap: Permission Denied #2

Open
mattBrzezinski opened this issue Sep 8, 2021 · 3 comments
Open

/var/runtime/bootstrap: Permission Denied #2

mattBrzezinski opened this issue Sep 8, 2021 · 3 comments

Comments

@mattBrzezinski
Copy link

I was attempting to modify this repo for an internal project, and ran into this issue. I then decided to just build and push up master here. When I attempt to test run the Lambda function on AWS I get the error:

START RequestId: e053eccc-2487-4b5b-891c-a6102b0f9c05 Version: $LATEST
/lambda-entrypoint.sh: line 14: /var/runtime/bootstrap: Permission denied
/lambda-entrypoint.sh: line 14: exec: /var/runtime/bootstrap: cannot execute: Permission denied
END RequestId: e053eccc-2487-4b5b-891c-a6102b0f9c05
REPORT RequestId: e053eccc-2487-4b5b-891c-a6102b0f9c05	Duration: 2.50 ms	Billed Duration: 3 ms	Memory Size: 4096 MB	Max Memory Used: 7 MB	
RequestId: e053eccc-2487-4b5b-891c-a6102b0f9c05 Error: Runtime exited with error: exit status 126
Runtime.ExitError

I've tried to do a chmod +x bootstrap after this in the Dockerfile. Same result 😕.

It seems that creating this bootstrap file which does a cd /var/task and runs you script is the correct thing to do according to the documentation.

@mattBrzezinski
Copy link
Author

Modifying the source a bit. The result of ls -la /var/runtime/bootstrap

-rwxr-xr-x 1 root root 185 Sep 8 17:01 /var/runtime/bootstrap

@Benvorth
Copy link

Benvorth commented Nov 25, 2022

I added a Pull-request fixing this in the dockerfile (#4). Please noe that this would need to run docker build with the DOCKER_BUILDKIT=1 flag since chmod-ing something is a feature that requires BUILDKIT enabled (see eg here).

@tk3369
Copy link
Owner

tk3369 commented Jan 3, 2023

I'm not able to see this problem with my test today... I was able to run it properly from AWS without doing any chmod.

When I check out the repo, the bootstrap file already has permission 0775. I think the COPY command should have carried over the executable flag. Right?

(base) ✔ ~/AWS/aws-lambda-container-julia [tk/julia-1.8-update|✔] 
03:14 $ ls -l
total 40
-rwxrwxr-x 1 ec2-user ec2-user  186 Jan  3 02:16 bootstrap
-rw-rw-r-- 1 ec2-user ec2-user 1201 Jan  3 03:02 Dockerfile
-rw-rw-r-- 1 ec2-user ec2-user 1102 Jan  3 02:16 LICENSE
-rw-rw-r-- 1 ec2-user ec2-user 3227 Jan  3 02:16 main.jl
-rw-rw-r-- 1 ec2-user ec2-user   71 Jan  3 02:16 Manifest.toml
-rw-rw-r-- 1 ec2-user ec2-user  257 Jan  3 02:16 Project.toml
-rw-rw-r-- 1 ec2-user ec2-user 3153 Jan  3 03:12 README.md
drwxrwxr-x 2 ec2-user ec2-user 4096 Jan  3 02:16 scripts
drwxrwxr-x 2 ec2-user ec2-user 4096 Jan  3 02:16 src
drwxrwxr-x 2 ec2-user ec2-user 4096 Jan  3 02:16 test

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

3 participants