Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

NiFi Container Permissions

New Contributor

We are trying to run NiFi + Registry 2.0.0-M2 on OpenShift, and no matter what combination of USER, chgrp, chmod, etc. we use we still get

"sed: couldn't open temporary file /opt/nifi/nifi-current/conf/sedYird4M: Permission denied"

and pod fails to start. 

We followed the OpenShift guidance of adding this to Dockerfile to no avail:
RUN chgrp -R 0 /opt/nifi && chmod -R g=u /opt/nifi

Please advise, this has been a blocker for a few days now!


Expert Contributor

Use a Dedicated Temporary Directory

Configure a Temporary Directory, Set an environment variable within your Kubernetes deployment YAML file specifying an alternative temporary directory with appropriate permissions for the NiFi user. You can leverage an empty directory volume mounted specifically for temporary files.

Update NiFi Configuration, Modify the NiFi configuration (potentially within the bootstrap.conf file) to use the environment variable for the temporary directory. Consult the NiFi documentation for specific instructions on how to configure an alternate temporary directory.