Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Wrong permission bits on cfn-init-created files #66

Open
markuspeloquin opened this issue Mar 22, 2018 · 0 comments
Open

Wrong permission bits on cfn-init-created files #66

markuspeloquin opened this issue Mar 22, 2018 · 0 comments

Comments

@markuspeloquin
Copy link

The permission bits must be quoted. The problem is here:

When YAML parses that, it produces in terms of JSON:

{"mode": 256}

CloudFormation then turns that into the string '256'. Later, cfn-init parses that using, in Python, int(file['mode'], 8). cfn-init then happily sets the mode of that file to 256: writable by user=root, read-executable by group=root, read-writable by other. This problem became very clear to me when I tried to set the mode to 0444 (292), which isn't a valid octal.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant