Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

NSM: remove chown from /usr/sbin/so-bro-cron #1030

Closed
dougburks opened this issue Dec 7, 2016 · 6 comments
Closed

NSM: remove chown from /usr/sbin/so-bro-cron #1030

dougburks opened this issue Dec 7, 2016 · 6 comments

Comments

@dougburks
Copy link
Contributor

On large sensors with lots of Bro logs, chown takes more than 5 minutes and the 5-minute cron jobs are piling up:
https://groups.google.com/d/topic/security-onion/V8hjVrKARss/discussion

@dougburks
Copy link
Contributor Author

@weslambert
Copy link

What is this script for? To just load in changes from securityonion.conf and pass them on to broctl? I'm assuming the chown was there to make sure that /nsm/bro has the appropriate permissions at every run?

@dougburks
Copy link
Contributor Author

/etc/cron.d/bro runs every 5 minutes and calls so-bro-cron. so-bro-cron runs /opt/bro/bin/broctl cron, which is a cron job required by Bro.

When we transitioned from running Bro as root to running Bro as a non-root user, so-bro-cron needed to chown the Bro files so that the sguil user could access them properly. If that chown takes more than 5 minutes, then the cron jobs pile up.

At this point, all users should have their Bro files owned by sguil, so I think we can safely remove this. The chown will still happen on initial Bro startup via /usr/sbin/nsm_sensor_ps-start, it just won't happen every 5 minutes anymore to avoid disk thrashing and process pileups.

@weslambert
Copy link

Thanks for the clarification, Doug!

@dougburks
Copy link
Contributor Author

@dougburks
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants