Closed nikolavp closed 10 years ago
I just encountered the same problem. Quick fix is to make tempfile world-writable. See my pull request https://github.com/maestrodev/puppet-maven/pull/30
I think that
FileUtils.chown(user, group, tempfile)
will be better. See http://ruby-doc.org/stdlib-1.9.3/libdoc/fileutils/rdoc/FileUtils.html.
New pull request created https://github.com/maestrodev/puppet-maven/pull/32
Fixed in 1.2.0
Thanks for the fast response.
We just found a problem with permissions when using the maven type. If we specify a custom user,group with which to download the maven artifact and have an ensure set to latest, we get an error message from maven because the Tempfile is read only.
We had a look at https://github.com/maestrodev/puppet-maven/blob/master/lib/puppet/provider/maven/mvn.rb and it seems that the user,group parameters are only honored for the maven execution but not for the Tempfile.
is generating a file with owner set to root and 'rw' only for him