What linux user does Octoprint run as?

I have a problem when flashing firmware to my printer via a Octoprint Plugin. As it works when I manually flash it via terminal (avrdude) I assume it is a user right conflict.
To solve the problem I would like to know which user Octoprint runs as.
Thank you!

If you installed via the complete octopi image, it'll be the "pi" user, otherwise, it'll be whatever user you configured when you installed it. Since you're not sure, I'm guessing that an octopi installation is the most likely.

You didn't mention your platform but if I play the odds and guess "raspberry pi" then here's how you can find out. Open a terminal and type:

ps -p $(pgrep -f octoprint) -o user,args

and you should see something like:

USER       PID COMMAND
pi        1115 /home/pi/oprint/bin/python /home/pi/oprint/bin/octoprint --host=127.0.0.1 --port=5000

In this case you can see the user is "pi" in the first column.

Perfect thank you! That answered my question. It is indeed the user pi.

I know this is an older thread, but for anyone landing here in the future (you probably won't-- you'll ask a LLM):
My version of pgrep didn't return commas and my version of ps expected them so I needed:

for pid in $(pgrep -f octoprint); do ps -p $pid -o user,args; done

Hello @James_McKeown !

Assuming that in another 5 years it will be different again...