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

destination file's permission can't be edited #37

Closed
sebinjohn opened this issue Feb 24, 2015 · 6 comments
Closed

destination file's permission can't be edited #37

sebinjohn opened this issue Feb 24, 2015 · 6 comments

Comments

@sebinjohn
Copy link

I am facing an issue to give permission to the destination file when the cache dir is set, because the the resource is already defined in the wget::fetch module. So the workaround is to set the destination to a temporary location and create a new resource by sourcing it to from the temporary location.

file { $destination:
  ensure  => file,
  source  => "${cache_dir}/${cache}",
  owner   => $execuser,
  require => Exec["wget-${name}"],
}

this is the code from the wget::fetch module.

@gdlx
Copy link

gdlx commented May 6, 2015

+1

It would be nice to allow setting owner/group/mode directly from wget call.

@mcallaway
Copy link

+1

@carlossg
Copy link
Member

carlossg commented May 6, 2015

can you suggest a PR ?

@mcallaway
Copy link

Working on a PR now.

@carlossg
Copy link
Member

carlossg commented May 6, 2015

Fixed in #44

@carlossg carlossg closed this as completed May 6, 2015
@c33s
Copy link
Member

c33s commented Sep 28, 2016

vote for reopen.

if i want to prevent the access from other user (mode 0400), this don't really fix the problem, it just moves it. with this fix i have to to ensure, that the cache location is in a directory where no other user can access the file. so /tmp or /var/tmp or /var/cache won't work.

the solution from https://unix.stackexchange.com/questions/118670/changing-default-permissions-for-wget is to call umask before wget, maybe this is also here a solution.

my workaround was to create a directory with the right permission, which i use as cache directory but sadly this workaround don't work for me, because i only want to download the file once and not redownload if the remote file chances. but there is no creates parameter which i can use. see #26

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