Should osquery be run as root?
We are deploying osquery but don't have permission to run it as root on Linux. Escalated privileges can be given. Will there be an issue if we run osquery with escalated privileges?
g
Grant Bilstad
04/08/2024, 4:49 PM
Hey @Jay,
the fleetd agent does expect elevated/root/system permissions. This is also important for script execution. Would expect to be a similar case for plain osquery, otherwise will run into all sorts of table issues and strangeness.
j
Jay
04/14/2024, 1:50 PM
Thank you @Grant Bilstad. Company policies prohibit root permissions, we can have elevated permissions. Can you point me to some documentation which lists the elevated permissions required for osquery?
Hi @Lucas Rodriguez
Thank you, this is informative.
It says recommended way is as root. As per our policy, we can have elevated permission but not root. It maybe difficult to get the approval.
Any alternatives? I can have a user with elevated privileges.
l
Lucas Rodriguez
04/23/2024, 2:20 PM
Hi @Jay! Sorry, Fleet doesn't support running osquery in non-root mode.
As far as I can see in some osquery Github issues, some users manage to run it as non-root but end up having issues with some tables, e.g.: https://github.com/osquery/osquery/issues/6484#issuecomment-664480831
So it really depends on the information/tables you would need to query.