[
https://issues.apache.org/jira/browse/MAPREDUCE-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884146#action_12884146
]
Greg Roelofs commented on MAPREDUCE-978:
----------------------------------------
bq. Files passed using -file option are packaged into a jar and unjarred on the
computing node. So, it wont preserve the execute permissions on the file.
There's no obvious reason it shouldn't. Jar files are zipfiles, and at least
the ant-built ones are created using Info-ZIP's zip (or something based on it),
which preserves Unix perms for every file. For example, here's one of the
directories in my hadoop-common/build/hadoop-common-0.22.0-SNAPSHOT.jar:
{noformat}
Central directory entry #5:
---------------------------
org/apache/hadoop/
offset of local header from start of archive: 336 (00000150h) bytes
file system or operating system of origin: Unix
version of encoding software: 2.0
minimum file system compatibility required: MS-DOS, OS/2 or NT FAT
minimum software version required to extract: 1.0
compression method: none (stored)
file security status: not encrypted
extended local header: no
file last modified on (DOS date/time): 2010 Jun 28 17:29:48
32-bit CRC value (hex): 00000000
compressed size: 0 bytes
uncompressed size: 0 bytes
length of filename: 18 characters
length of extra field: 0 bytes
length of file comment: 0 characters
disk number on which file begins: disk 1
apparent file type: binary
Unix file attributes (040755 octal): drwxr-xr-x
MS-DOS file attributes (10 hex): dir
{noformat}
If the corresponding Unix unzip were used to do the unpacking, the Unix perms
would be restored correctly. (UID/GID could be stored and recovered, as well,
but that requires an extra option on each end and a privileged [root] user to
do the unpacking.)
> -file option in streaming does not preserve execute permissions
> ---------------------------------------------------------------
>
> Key: MAPREDUCE-978
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-978
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: contrib/streaming
> Reporter: Chris Dyer
>
> For a streaming application I used the -file option to move some executable
> files to the slave nodes. On the submit node, they had +x permissions but on
> the destination node they were created with -x permissions. This probably
> has to do with the umask settings on the various nodes, but streaming should
> preserve the original permissions.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.