Fixes execute permissions for files when copied to container.#580
Merged
marcuslinke merged 7 commits intodocker-java:masterfrom May 24, 2016
Merged
Fixes execute permissions for files when copied to container.#580marcuslinke merged 7 commits intodocker-java:masterfrom
marcuslinke merged 7 commits intodocker-java:masterfrom
Conversation
…opyArchiveToContainerCmdIml. Files added to tar are stored with 644 permission mode. As a result, execute permissions are discarded. This fix retains permissions for files inside directories copied with copyArchiveToContainerCmdIml.
…e added to tar using copyArchiveToContainerCmdIml.
…with execute permission. Test Case that simulates a scenario where a script file with permission to execute is copied to the containers with CopyArchiveToContainerCmdImpl and then it is executed.
Contributor
|
@denlap007 Thanks for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes the issue of discarding execute permissions of files when copied to a container.
For every file copied to a container, permissions default to 644 mode. As a result, execute permissions on files are lost and files cannot execute.
I created and added to copyArchiveToContainerCmdImplTest a Test Case that simulates such a scenario.
Also, I have written code to maintain permissions of a file copied to a container as in host's file system, but I do not know if this is going to be useful to be added. If anyone thinks it is, let me know.
This change is
Sorry for any unnecessary commits. If you want I may create a new PR.