I don't want to call this a bug exactly, since it's technically
documented behaviour within Hierynomus but it's not clear from the
NiFi documentation itself and should probably be configurable
behaviour.

When using the GetSmbFile processor to ingest files with "Keep Source
File" set to "false", if any source file is marked "Read Only" then
NiFi will not be able to delete the source file no matter what
permissions the Nifi account has on the shared folder. Currently, the
documentation for the GetSmbFile processor only indicates that "write"
permission is needed.

When the processor encounters a read-only file, it successfully
ingests the file and generates a flowfile to the "success"
relationship of the processor, but it also fails to delete the file
and the processor raises an error within the Nifi UI and log files.
Since the source file is not deleted, this typically results in Nifi
generating a huge volume of duplicate flowfiles, along with a
corresponding error message for each one.

As far as I can tell, there is no way to make the built-in GetSmbFile
processor to handle a read-only file. I was able to modify the
existing processor to correctly delete a read-only file by clearing
the read-only flag on a source file before share.rm(file) is called on
the file, but I think it would make sense for that behaviour to be
configurable on the processor, IE via a "force delete read-only files"
property.

I'm curious if this is a situation anybody else has run into and if
there's an existing way to handle read-only files, or if handling
read-only files explicitly makes sense as a new behaviour to add to
the processor.

-Evan Davies

Reply via email to