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

Fixed permissions for local build #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SerheyDolgushev
Copy link

This PR is about changing permissions for the built bootstrap file.

In the last released tag (https://github.com/softprops/serverless-rust/releases/tag/v0.3.8) integer 755 value is used

Which is incorrect.

In the latest master octal 0o755 value is used: https://github.com/softprops/serverless-rust/blob/master/index.js#L172

But this also causes some issues. Ways to reproduce:

  1. Clone https://github.com/SerheyDolgushev/serverless-rust-example
  2. Run hello rust lambda function:
    npx serverless invoke local -f hello
  3. Try to unzip target/lambda/release/lambda.zip using unzip command:
    unzip target/lambda/release/lambda.zip 
    Archive:  target/lambda/release/lambda.zip
       skipping: bootstrap               volume label
  4. It is still possible to unzip target/lambda/release/lambda.zip just by double-clicking on it. But extracted bootstrap will have wrong permissions in this case (-r--r--r-- so execute permission is missing):
    ls -l target/lambda/release/bootstrap 
    -r--r--r--  1 sdolgushev  72107521  6765776 Mar 25 09:32 target/lambda/release/bootstrap

The issue is fixed with this PR.

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

Successfully merging this pull request may close these issues.

1 participant