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

Template should accept file permissions #31

Closed
BrianHicks opened this issue Jun 3, 2016 · 4 comments
Closed

Template should accept file permissions #31

BrianHicks opened this issue Jun 3, 2016 · 4 comments
Milestone

Comments

@BrianHicks
Copy link
Contributor

These should be templated as well, but user and group should be separate resources.

@BrianHicks BrianHicks added this to the 0.1 milestone Jun 3, 2016
@BrianHicks BrianHicks changed the title Tempalte should accept file permissions Template should accept file permissions Jun 3, 2016
@langston-barrett
Copy link
Contributor

What were you envisioning for this? Something like the following?

type Template struct {
    TemplateName string
    RawContent string `hcl:"content"`
    RawDestination string `hcl:"destination"`

    // file permissions
    Owner string `hcl:"owner"`
    Group string `hcl:"group"`
    Mode string `hcl:"mode"`
}

Also: why not just accomplish this with something like file/owner, file/group, and file/mode tasks?

@BrianHicks
Copy link
Contributor Author

Because if we're rendering sensitive information to disk it needs to write a more secure default. Right now it's 0755ing everything, which is not ideal. It could be 0600 by default and then expect the user to specify mode separately, you're right.

In your code sketch, we'd just have mode. Maybe this needs to be a separate issue.

@langston-barrett
Copy link
Contributor

@BrianHicks That makes sense, I guess you never want secrets on disk with loose permissions (even for a second). I prefer the option of documenting the default 0600 and deferring to a file/mode task, but I'm game for anything!

@BrianHicks
Copy link
Contributor Author

Closing in favor of those referenced above.

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

No branches or pull requests

2 participants