-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix filesystem permission parity #22
Conversation
log.Warnln("Could not change file mode recursively of directory /opt:", err) | ||
} | ||
// fix permissions of the tmp directory for better AWS parity | ||
if err := ChmodRecursively("/tmp", 0700); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do that for the directory only assuming that in ephemeral environments /tmp
should be empty 🤔 ?
I guess that's mostly relevant for custom worker scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in custom worker scenarios we might want to clear the /tmp directory anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fully agree 👍 . Assuming an empty /tmp
directory seems fair.
Hence, it doesn't matter too much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI custom worker currently cleans /tmp
, /var/task
and /opt
Motivation
Addresses localstack/localstack#8897
Changes
/opt
(layers directory) to0755
/tmp
to0700
ChmodRecursively
Unrelated changes:
Testing
Run the test
tests.aws.services.lambda_.test_lambda.TestLambdaLayerBehavior.test_layer_permissions
in https://github.com/localstack/localstack-ext/pull/2165 against this new Go binary.