ijokarumawak commented on a change in pull request #3294: NIFI-6004 PutFile 
created directory permissions
URL: https://github.com/apache/nifi/pull/3294#discussion_r293205307
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFile.java
 ##########
 @@ -206,9 +211,58 @@ public void onTrigger(final ProcessContext context, final 
ProcessSession session
             final Path tempCopyFile = rootDirPath.resolve("." + 
flowFile.getAttribute(CoreAttributes.FILENAME.key()));
             final Path copyFile = 
rootDirPath.resolve(flowFile.getAttribute(CoreAttributes.FILENAME.key()));
 
+            final String permissions = 
context.getProperty(CHANGE_PERMISSIONS).evaluateAttributeExpressions(flowFile).getValue();
+            final String owner = 
context.getProperty(CHANGE_OWNER).evaluateAttributeExpressions(flowFile).getValue();
 
 Review comment:
   It may be more user-friendly if we add a short notice to the `CANGE_OWNER` 
property description about setting file/dir ownership requires super-user 
privilege on some OS, like OS X. OS X chown man page goes:
   >     For obvious security reasons, the ownership of a file may only be 
altered by a super-user.  Similarly, only a member of a group can change a 
file's group ID to that group.
   https://www.unix.com/man-page/osx/8/chown/

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to