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

Prabhu Joseph commented on HADOOP-17848:
----------------------------------------

[~anoop.hbase] 

bq. The call fs.setPermission(filePath, new 
FsPermission(FILE_LOG_PERMISSIONS)); is removing the owner/group details?

No. The write call using Append stream is removing the owner/group details.

{code}
stream = fs.append(filePath);
stream.write(888);
{code}

> Hadoop NativeAzureFileSystem append removes ownership set on the file
> ---------------------------------------------------------------------
>
>                 Key: HADOOP-17848
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17848
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>            Reporter: Prabhu Joseph
>            Priority: Major
>
> *Repro:* Create Operation sets ownership whereas append operation removes the 
> same.
> Create:
> *// -rw-r--r-- 1 root supergroup 1 2021-08-15 11:02 /tmp/dummyfile*
> Append:
> *// -rwxrwxrwx 1 <NULL>  <NULL> 2 2021-08-15 11:04 /tmp/dummyfile*
> {code:java}
> import org.apache.hadoop.conf.Configuration;
> import org.apache.hadoop.fs.FSDataOutputStream;
> import org.apache.hadoop.fs.FileSystem;
> import org.apache.hadoop.fs.Path;
> import org.apache.hadoop.fs.permission.FsPermission;
> public class Wasb {
>  private static final short FILE_LOG_PERMISSIONS = 0640;
>  
>  public static void main(String[] args) throws Exception {
>  
>     Configuration fsConf = new Configuration();
>     fsConf.set("fs.azure.enable.append.support", "true");
> Path filePath = new Path("/tmp/dummyfile");
> FileSystem fs = FileSystem.newInstance(filePath.toUri(), fsConf);
> FSDataOutputStream stream = fs.create(filePath, false);
> stream.write(12345);
> stream.close();
> stream = fs.append(filePath);
> stream.write(888);
> stream.close();
> fs.close();
>  }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to