0
votes

I'm using the listfile processor in Nifi. List+Fetchfile will look in the specified directory for the files . However , The files placed in the directory having a different username and group. In order to Nifi read my files . I have to give 777 permission . then only Nifi is listing and fetching the files to proceed further.Is it possible to specify username in Nifi to use the specific username.For example below . I want to listfiles as user_abc instead of Nifi

For example

-rw-r--r-- 1 user_abc group1   12549 Mar 26 16:04 filename.csv
-rw-r--r-- 1 user_abc group1   12366 Mar 26 16:05 files.csv

Also would it be possible to change the permission 644 to 755 using any processor in Nifi.

2
No you cannot access shared directory from ListFile+FetchFile processor if it having credentials. - Mister X
run nifi under user_abc - daggett

2 Answers

0
votes

NiFi instance will run as the user from which you started the NiFi service.

If that user don't have access to local files, then NiFi cannot access these files.

File owner must add permission to access that files to user_abc user.

Regarding would it be possible to change the permission 644 to 755 using any processor in Nifi, it is not possible to change existing file permission. But you can change permission for the directory which you create using PutFile processor.

0
votes

You could use ListFtp and FetchFtp processors with user_abc credentias.