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

Extraction fails when user/group set with extract_path no permissions #108

Closed
fatmcgav opened this issue Dec 24, 2015 · 4 comments
Closed

Comments

@fatmcgav
Copy link

When attempting to use the Archive resource to extract a zip file into /usr/local/ with a user/group value set, and extract_path set to a directory where the user/group doesn't have permissions, the extract fails (silently - raised as #107).

Could possibly work-around this by chowning the files after extraction, rather than trying to run the extraction as the user/group.

Related to #22.

@nanliu
Copy link
Contributor

nanliu commented Jan 12, 2016

Not sure how to solve this, we can make some assumptions of the extraction target directory based on creates parameter, is that reasonable? something along the line of extract as root and recursively chmod the creates directory (but only do that as a rescue of exception?). would it be better for your use case to just use archive with root and subscribe with an chmod to the user/group you want?

@fatmcgav
Copy link
Author

@nanliu Yeh, as it happens I went with a subscribed exec chmod...

Though a recursive chmod on an exception might be a good alternative...

@jyaworski
Copy link
Member

Do we actually want this functionality? I see the use-case for it. Is there a decent way to chmod/chown on Windows, or is that even a thing?

@nanliu
Copy link
Contributor

nanliu commented Mar 5, 2016

This is documented in https://github.com/nanliu/puppet-archive/tree/GH-55#file-permission and will be part of #55. I think the first option (manage the extraction directory) should work better than subscribed exec, but I documented both. Please review and feel free to reopen this issue if you have any further concerns.

@nanliu nanliu closed this as completed Mar 5, 2016
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

3 participants