maven icon indicating copy to clipboard operation
maven copied to clipboard

default resource changes mode of dest directory

Open dschlenk opened this issue 8 years ago • 5 comments

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 avatar Aug 02 '17 17:08 dschlenk

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

dschlenk avatar Aug 02 '17 17:08 dschlenk

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.

JasonWThompson avatar Aug 09 '17 18:08 JasonWThompson

@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.

dschlenk avatar Aug 14 '17 14:08 dschlenk

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

iennae avatar Sep 05 '17 04:09 iennae

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.

tas50 avatar Sep 09 '17 03:09 tas50