I decided to register here, cause lately I started to use Suricata and I stumbled upon a problem for which I could not find any reasonable solution.
According to your movie on YouTube (Getting Started with Suricata-Update: Managing rule sets and sources - YouTube) I am tring to ingest betacop.pcap to “suri-ingest-pcap.sh” script.
I am still getting following errors:
Hi @h0llym0lly !
Welcome to our forum!
I just looked at the video and the scripts used in it. I believe you used this script before the ingest one that you’ve posted?
It does not seem to be doing anything for the logging directory.
Please let me know if you ran some other script too.
To give you an idea, the user you’re running Suri with must be a part of the group that has permissions or it should be the owner of the file. I’d also check for the paths leading to the file, does the directory leading to the file you want to open have diff group or users? Is your user a part of them?
Lastly, I’d check for the read/write permission to the file for user or group.
You could start by trying to open the /var/log/.. file from the same directory where you’re running the script from and also with the same user in your favorite text editor and fix things accordingly?
suri-ingest-pcap.sh runs with the capabilities/permissions granted to the user identified from the Linux command logname. I suspect that user is not suricata.
There are at least 2 ways to proceed:
Edit suri-ingest-pcap.sh and remove the --user=$SESSION_USER from the line that launches Suricata.
Or, change the ownership and permission bits of /var/log/suricata to grant access to the user identified from logname
To confirm the hypothesis, can you paste the output of logname here?
This is because the Suricata configuration file (suricata.yaml) is not locating the rule file. It’s looking in the /var/lib/suricata/rules directory.
Check the location that suricata-update put the rules file – that must match the values in your configuration file – these are settings from my setup – the values will be different in your setup
This example shows that Suricata will try to find a file named suricata.rules in /usr/local/etc/suricata.rules. The actual values in your configuration file must match the values used by suricata-update.
These permission bits permit read/search to the user suricata – if you’re running as a non-root user other than suricata, it will lack access to the directory containing the rules.
What user are you running with … what’s the output of id?