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

Chris Nauroth commented on HADOOP-11415:
----------------------------------------

See this comment for a proposed solution using JNI to call {{fchmod}}:

https://issues.apache.org/jira/browse/HADOOP-11321?focusedCommentId=14233329&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14233329

Note that just creating the file or directory with specific permissions 
initially may be insufficient, because the existing contract of {{FileSystem}} 
basically guarantees that the process umask is not a factor.  That's discussed 
in more detail here:

https://issues.apache.org/jira/browse/HADOOP-11321?focusedCommentId=14230778&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14230778


> Local file system on Linux may create files and directories initially with 
> wider permissions than intended.
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11415
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>            Reporter: Chris Nauroth
>
> As discussed in HADOOP-11321, the local file system implements file and 
> directory creation as a two-step process: create followed by chmod to set the 
> caller's requested permissions.  This causes a brief window in which the new 
> file or directory may have wider permissions than what the caller requested.  
> HADOOP-11321 fixed this specifically for Windows as a side effect of fixing a 
> bug in writing to an SMB share.  This issue tracks fixing it specifically for 
> Linux.



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

Reply via email to