Support Questions

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

NIFI How to run nifi as user root

avatar
Contributor

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