Snorby / snorby

Ruby On Rails Application For Network Security Monitoring
Other
1k stars 226 forks source link

Snorby worker has to run as root #471

Open ImplicitDeny opened 7 years ago

ImplicitDeny commented 7 years ago

The Snorby GUI says that the worker is not running, using the Worker Options > Start Worker button don't change anything. I've tried to call snorby:update, all is running properly (except 2 warnings without unrelated to my issue) until the [X] Error : Unable to start the Snorby worker process. There is no indication on what is causing the problem, and none of the solutions found on the internet have done the job.

I'm running Snort on CentOS 7, with barnyard writing in a local database. Snorby is on httpd (apache) with passenger, and is well reading the database (events are occuring when I trigger the ICMP test rule by pinging the server). All that is appearing onto the Snorby GUI, but there is still the worker issue.

Calling Snorby::Worker.running? in the rails console return false. Calling Snorby::Worker.start return empty, and have no effect. What should I do to make it start ?

UPDATE : Please do not consider the above message. I finally get this lazy worker to run, by running the _RAILSENV=production bundle exec rake snorby:update command as root.

It's a bit embarassing to have to log as root in order to start this. I've searched through various config files, and I double-checked the permissions and owner granted to snorby files, but I can't find any way to make it work as a non-root user.

Is that a real issue, or am I missing something important ?