adamkewley / jobson

A platform for transforming command-line applications into a job service.
Apache License 2.0
256 stars 20 forks source link

Maintain executable (and other) file permissions when copying dependencies over #8

Closed adamkewley closed 6 years ago

adamkewley commented 6 years ago

This bug occurs because the Apache Commons IO .copyDirectory method doesn't copy file-level permissions when it copies a file in a directory tree. Instead, it creates a new file and uses a nio Channel to write the data from the source to the destination. The newly-created destination file inherits its permissions from the parent directory, rather than from the source file.

Short of putting a ticket in to ask about this to the Apache Commons IO team, the only solution is to write a directory walker that works as I would expect the copier to work.

adamkewley commented 6 years ago

This has now been fixed with a custom copy routine, the fix will be deployed in 0.0.14