Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

NIFI How to run nifi as user root

avatar
Rising Star

Hi Everyone,
How do you run NIFI - Ambari as root user ?

1 REPLY 1

avatar
Master Mentor

@rizalt 

There is very little detail in your post.

NiFi will run as whatever user is used to start it unless the "run.as" property is set in the NiFi bootstrap.conf file.

If the user trying to execute the "./nifi.sh start" command is not the root user and you set the "run.as" property to "root", that user would need sudo permissions in linux to start NiFi as the root user.   

The "run.as" property is ignored on Windows where the service will always be owned by user that starts it.

NOTE: Starting the service as a different user then it was previously started at will not trigger a change in file ownership in NiFi directories. You would need to update file ownership manually be starting as a different issue (this includes all NiFi's repositories).

While "root" user has access to all files regardless of owner, issues will exist if no root user launches app and files are owned by another user including root.

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt