Skip to content

Fixes execute permissions for files when copied to container.#580

Merged
marcuslinke merged 7 commits intodocker-java:masterfrom
denlap007:master
May 24, 2016
Merged

Fixes execute permissions for files when copied to container.#580
marcuslinke merged 7 commits intodocker-java:masterfrom
denlap007:master

Conversation

@denlap007
Copy link
Copy Markdown
Contributor

@denlap007 denlap007 commented May 14, 2016

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 Reviewable

Sorry for any unnecessary commits. If you want I may create a new PR.

denlap007 added 7 commits May 14, 2016 23:58
…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.
@marcuslinke marcuslinke merged commit 381b7db into docker-java:master May 24, 2016
@marcuslinke
Copy link
Copy Markdown
Contributor

@denlap007 Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

2 participants