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

Preserve file permission when creating archives #23

Open
thrau opened this issue Apr 9, 2014 · 3 comments
Open

Preserve file permission when creating archives #23

thrau opened this issue Apr 9, 2014 · 3 comments
Labels
Milestone

Comments

@thrau
Copy link
Owner

thrau commented Apr 9, 2014

Restoring file permissions on extraction works with #14, however there are no clean mechanisms for reading permissions from a File and setting them in an ArchiveEntry.

@thrau thrau added this to the v1.0.0 milestone Apr 9, 2014
@thrau thrau added feature and removed feature labels Apr 9, 2014
@thrau thrau modified the milestones: v2.0.0, v1.0.0 May 4, 2015
@skarpushin
Copy link

@thrau , great lib! Any plans on implementing this feature?

@thrau
Copy link
Owner Author

thrau commented Oct 20, 2018

are you on *nix or windows? the problem is really that the java file permissions are very course grained and there's no good way of reading them in a cross-platform way.
for *nix we could maybe just use a similar mechanism as with permission restoring.

@skarpushin
Copy link

In my case I'm more concerned about execution permissions on *nix platforms. It turned out to be a relatively simple thing to do. I just added this line for each decompressed file (entry is declared as TarArchiveEntry entry)

Files.setAttribute(file.toPath(), "unix:mode", entry.getMode());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants