title: How to set Hadoop fs.s3a.acl.default on AWS EMR?
body: <p>I have a map-reduce application running on AWS EMR that writes some output to a different (aws account) s3 bucket. I have the permission setup and the job can write to the external bucket, but the owner is still the <code>root</code> from the account where the Hadoop job is running. I would like to change this to the external account that owns the bucket.</p>
  
  <p>I found I can set <code>fs.s3a.acl.default</code> to <code>bucket-owner-full-control</code>, however that doesn't seem like working. This is what I am doing:</p>
  
  <pre><code>conf.set("fs.s3a.acl.default", "bucket-owner-full-control");
  FileSystem fileSystem = FileSystem.get(URI.create(s3Path), conf);
  FSDataOutputStream fsDataOutputStream = fileSystem.create(new Path(filePath));
  PrintWriter writer  = new PrintWriter(fsDataOutputStream);
  writer.write(contentAsString);
  writer.close();
  fsDataOutputStream.close();
  </code></pre>
  
  <p>Any help is appreciated.</p>