If the run.as user is set, the user who is starting nifi will need 'sudo
-u' access, according to the nifi.sh script.

If you want to avoid sudo access, just make sure the user executing nifi.sh
is the correct user, eg. nifi.

See line 327 [1] in nifi.sh.

This is my understanding at least. If someone else has additional info,
please add.

Chad

1.
https://github.com/apache/nifi/blob/db40989b4833cb4281b7082712b43be78998d071/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-resources/src/main/resources/bin/nifi.sh#L327

On Mon, Aug 9, 2021 at 4:41 AM Edward Armes <edward.ar...@gmail.com> wrote:

> You should also be aware, that you might have some issues listening or
> using protected/privileged ports (1 - 1023 inclusive)
>
> Regards
>
> Edward
>
>
> On Mon, 9 Aug 2021, 08:58 Jens M. Kofoed, <jmkofoed....@gmail.com> wrote:
>
> > No. But the user need rwx rights to all the folders which is configured
> > for NiFi. And read+write to all the files.
> > I create a user which is not allowed to login and change owners to all
> the
> > different folders. If you don’t charge folders for NiFi database,
> > provanace, content, logs etc. you should be ok to just use this command:
> > chown -R nifi /opt/nifi/nifi-current
> >
> > If you use a username of nifi and if the running nifi is in folder
> > /opt/nifi/nifi-current
> >
> > Kind regards
> > Jens M. Kofoed
> >
> > > Den 8. aug. 2021 kl. 18.46 skrev Lovish Gulati <lovishgul...@gmail.com
> >:
> > >
> > > Hi,
> > >
> > > When running Nifi on CentOS 7 as a non-root user by using run.as=
> > option,
> > > does that non-root user need sudo or su capability?
> > > Please advise.
> > >
> > > Thanks
> > > Lovish
> >
>

Reply via email to