[ 
https://issues.apache.org/jira/browse/HDFS-6434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15332756#comment-15332756
 ] 

Andrew Wang commented on HDFS-6434:
-----------------------------------

Hmm, so I dug in a little more to this issue, and noticed HADOOP-9155. It looks 
like the default permissions are supposed to be 0777 for dirs and 0666 for 
files, and WebHdfsFileSystem is unfortunately not using the new FsPermission 
methods that were introduced. The default umask of 0022 at 
{{CommonConfigurationKeys.FS_PERMISSIONS_UMASK_DEFAULT}} is what then brings it 
down to to 0755 or 0644.

So, is the right fix here to use the new FsPermission methods, i.e. 
getDirDefault and getFileDefault? I think we can just call this one a bug, 
given that the behavior in HADOOP-9155 is the expected one.


> Default permission for creating file should be 644 for WebHdfs/HttpFS
> ---------------------------------------------------------------------
>
>                 Key: HDFS-6434
>                 URL: https://issues.apache.org/jira/browse/HDFS-6434
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>            Reporter: Juan Yu
>            Assignee: Wellington Chevreuil
>            Priority: Minor
>         Attachments: HDFS-6434.002.patch, HDFS-6434.patch
>
>
> Creating a file by using WebHdfs without specify permission. file is created 
> with permission 755. it should be 644.
> WebHdfs seems using the same default permission for both file and directory.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to