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

default resource changes mode of dest directory #85

Open
dschlenk opened this issue Aug 2, 2017 · 5 comments
Open

default resource changes mode of dest directory #85

dschlenk opened this issue Aug 2, 2017 · 5 comments

Comments

@dschlenk
Copy link

dschlenk commented Aug 2, 2017

Cookbook version

4.0.1, 2.2.0

Chef-client version

12.17.44

Platform Details

CentOS 6.8; test kitchen vagrant box

Scenario:

When using the default resource and you use '/tmp' as the dest it'll change your /tmp directory permissions to sadtimes aka 0755.

Steps to Reproduce:

Use the default 'maven' resource with dest '/tmp'.

Expected Result:

The resource is downloaded.

Actual Result:

The resource is downloaded but also the dir that 'dest' is set to has its mode changed to 0755.

@dschlenk
Copy link
Author

dschlenk commented Aug 2, 2017

Happy to provide a patch, but a) wasn't sure if anyone else thinks this is something that should change and b) wanted feedback on possible solution. My thought is to:

  • add a guard to the directory resource so it does nothing if it already exists
  • make the mode a node attribute

@JasonWThompson
Copy link

I discovered this as well today. This causes issued for the nodes that I wish to manage via chef. To get around this, I changed the directory to download content from /tmp to /tmp/maven. This contained the mess and allowed me to continue to use /tmp for my other applications.

@dschlenk
Copy link
Author

@JasonWThompson yep that's what I did as well. Wanted to see if there was an appetite for a patch or if folks actually like this behavior.

@iennae
Copy link
Contributor

iennae commented Sep 5, 2017

We're happy to accept patches and contributions from the community. Make sure that any suggested changes don't have unintended consequences.

@tas50
Copy link
Contributor

tas50 commented Sep 9, 2017

I’m adding the Type: Jump In GitHub label to this issue. This is a great issue for someone to get their feet wet with and we’d love a PR to resolves the issue.

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

No branches or pull requests

5 participants