ntop / n2disk

Open source components and extensions for n2disk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request, n2disk able to run as the current linux user

cratuki opened this issue · comments

Feature request: please add a flag to n2disk so that it runs as the current linux user, rather than changing to the n2disk user.

In Napatech support ticket NTS-1005242 I wrote (minor changes), """
We are working on projects internally that talk to the napatech cards.

We have been speaking to ntop. Their experience is to access napatech hardware via root permissions.

I am writing to you ask about options.

Quick note about our motives. We deploy software as one of two Linux users,

  • prod, on the production grid-of-computers

  • nonp, everywhere else.

There is a layer of software management that coordinates deployment - this is similar to tools like kubernetes or mesos. ('deployment fabric').

I am wary of solutions that involve use of sudo - that is not compatible with the current design of our deployment fabric.

We have run a test to put a user in the linux group napatech, and then to build C code that accesses the napatech C API. This appears to work well. Please indicate if you have any further thoughts about this approach, and I will close the ticket.
"""

They replied endorsing this approach, """
Running as a user in the "napatech" group is definitely ok. There was a limitation in the past, but it was removed many years ago.
"""

Please note that n2disk can run as any user, you can specify it with -u
however, it should be launched by root (to let it open a raw socket and similar stuff) or set the proper capabilities, then it switches to the specified user after the initialisation.

I will be able to make my things work with the -u flag. Thank you.