I use suricata 6.0.1 in Docker. My image usualy works fine but this time, on a CentOS 7.9, i have an error message when i want to launch my container.
sonde_ids | Error opening file /var/log/suricata//suricata.log
sonde_ids | 27/2/2021 – 00:09:25 - - This is Suricata version 6.0.1 RELEASE running in SYSTEM mode
sonde_ids | 27/2/2021 – 00:09:25 - - [ERRCODE: SC_ERR_LOGDIR_CONFIG(116)] - The logging directory “/var/log/suricata/” supplied by /etc/suricata/suricata.yaml (default-log-dir) is not writable. Shutting down the engine
I put a 777 rights on the /var/log/suricata/ and i have the same error.
SELinux can make this happen. Its easily fixable by adding “:z” to the end of your volume. Otherwise there could be many reasons… If you post how you launch the container it might help figure out whats up.