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

Set default mode to uploaded configuration files #27

Merged
merged 2 commits into from
Sep 26, 2013
Merged

Set default mode to uploaded configuration files #27

merged 2 commits into from
Sep 26, 2013

Conversation

jdeppe-pivotal
Copy link

scp sets permissions to the uploaded tmp file by default to 0400 and PR #26 caused them to be copied to the actual destination. So set the file mode always, defaulting to 0644.

perms, meaning that it isn't readable by non-root users. Not sure if
this is the right approach though...
@tmatilai
Copy link
Owner

I didn't have time to test well your previous PR (#26) but I already thought setting the default mode to 0644 as I was afraid the umask might be something else. I had already opened a tab to file an issue about it. =)

So would you like to change this PR to set the default mode in Action::Base#write_config? No obligation, I'll do it later today otherwise.

@tmatilai
Copy link
Owner

Oh, just realized this is not because of umask, but because scp sets the strict permissions. The same solution sounds the best to me though.

@jdeppe-pivotal
Copy link
Author

I think this is what you mean.

BTW, thanks for this plugin. It's a life saver when you're behind a corporate proxy and can't go sit in the coffeehouse all day. :)

@tmatilai
Copy link
Owner

Yep! I'll merge now (again without testing ;)). As soon as I'm done with the day job I'll try to prepare a point release.

Thanks for the thanks! =)
Funny thing is that my own original need was just to configure Apt to use apt-cacher-ng. But it really seems that the corporate proxies make a much bigger market. ;)

@tmatilai
Copy link
Owner

Btw, I edited the issue title and description.

tmatilai added a commit that referenced this pull request Sep 26, 2013
Set default mode to uploaded configuration files
@tmatilai tmatilai merged commit 73d569d into tmatilai:master Sep 26, 2013
@tmatilai
Copy link
Owner

@jdeppe-pivotal Just a heads up that I released v0.5.2 last night including these fixes. Thanks for contributing!

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.

2 participants