[
https://issues.apache.org/jira/browse/HADOOP-9155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535527#comment-13535527
]
Binglin Chang commented on HADOOP-9155:
---------------------------------------
Regarding HDFS-4319, I read the code of CopyToLocal, it seams it doesn't copy
fspermission from src to dest, but just use default permission, which leads to
this problem?
{code}
CommandWithDestination.java
void writeStreamToFile(InputStream in, PathData target) throws IOException {
FSDataOutputStream out = null;
try {
out = create(target);
IOUtils.copyBytes(in, out, getConf(), true);
} finally {
IOUtils.closeStream(out); // just in case copyBytes didn't
}
}
// tag created files as temp files
FSDataOutputStream create(PathData item) throws IOException {
try {
return create(item.path, true);
} finally { // might have been created but stream was interrupted
deleteOnExit(item.path);
}
}
{code}
> FsPermission should have different default value, 777 for directory and 666
> for file
> ------------------------------------------------------------------------------------
>
> Key: HADOOP-9155
> URL: https://issues.apache.org/jira/browse/HADOOP-9155
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Binglin Chang
> Priority: Minor
>
> Currently umask works differently as linux convention, which is:
> The default umask 0002 is used for regular users.
> The default umask for the root user is 0022.
> For directories, the base permissions are 0777 and for files 0666.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira