Skip to content

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