[OISF/outreachy] Errors in main.py
Shivani Bhardwaj
sbhardwaj at openinfosecfoundation.org
Mon Mar 18 08:16:38 UTC 2019
On Sun, Mar 17, 2019 at 7:56 PM Himanshi Mathur via Outreachy
<outreachy at lists.openinfosecfoundation.org> wrote:
>
> Sir/Ma'am
> I installed Suricata as per the guidelines however when I run main.py in the terminal I get the following error as shown below. I want o know that I have to encounter them or some installation is not done properly since it says fail to open suricata.yaml.
>
>
>
> 17/3/2019 -- 19:54:24 - <Error> -- [ERRCODE: SC_ERR_FATAL(171)] - failed to open file: /etc/suricata/suricata.yaml: Permission denied
>
> Traceback (most recent call last):
>
> File "main.py", line 1464, in <module>
>
> main()
>
> File "main.py", line 1458, in main
>
> sys.exit(_main())
>
> File "main.py", line 1290, in _main
>
> config.get("suricata-conf"), suricata_path=suricata_path)
>
> File "/Users/himanshimathur/Desktop/suricata-update-master/suricata/update/engine.py", line 96, in load
>
> env=env)
>
> File "/Users/himanshimathur/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output
>
> **kwargs).stdout
>
> File "/Users/himanshimathur/anaconda3/lib/python3.6/subprocess.py", line 418, in run
>
> output=stdout, stderr=stderr)
>
> subprocess.CalledProcessError: Command '['/usr/local/bin/suricata', '-c', '/etc/suricata/suricata.yaml', '--dump-config']' returned non-zero exit status 1.
>
Seems like you have permission issues with your /etc/suricata
directory and the user you're trying to run the command from.
The easy way to fix this is by running the command with sudo. The correct way
however is https://suricata-update.readthedocs.io/en/latest/quickstart.html#directories-and-permissions
>
> Waiting in anticipation.
> --
> Thanks and regards
> Himanshi Mathur
> CSE undergrad 2022
> IIIT DELHI
> _______________________________________________
> Outreachy mailing list
> Outreachy at lists.openinfosecfoundation.org
> https://lists.openinfosecfoundation.org/listinfo/outreachy
--
Shivani
More information about the Outreachy
mailing list