<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div>thanks for the suggestion however after build with intelmqsetup the problem persists. Following is an exception and the files in etc and the access privileges.</div><div><br></div><div><div>Traceback (most recent call last):</div><div> File "/usr/local/bin/intelmqctl", line 11, in <module></div><div> load_entry_point('intelmq==2.0.1', 'console_scripts', 'intelmqctl')()</div><div> File "/usr/local/lib/python3.6/dist-packages/intelmq-2.0.1-py3.6.egg/intelmq/bin/intelmqctl.py", line 1710, in main</div><div> x = IntelMQController(interactive=True)</div><div> File "/usr/local/lib/python3.6/dist-packages/intelmq-2.0.1-py3.6.egg/intelmq/bin/intelmqctl.py", line 749, in __init__</div><div> self.load_defaults_configuration()</div><div> File "/usr/local/lib/python3.6/dist-packages/intelmq-2.0.1-py3.6.egg/intelmq/bin/intelmqctl.py", line 929, in load_defaults_configuration</div><div> config = utils.load_configuration(DEFAULTS_CONF_FILE)</div><div> File "/usr/local/lib/python3.6/dist-packages/intelmq-2.0.1-py3.6.egg/intelmq/lib/utils.py", line 194, in load_configuration</div><div> with open(configuration_filepath, 'r') as fpconfig:</div><div>PermissionError: [Errno 13] Permission denied: '/opt/intelmq/etc/defaults.conf'</div></div><div><br></div><div><div>drwxr-xr-x 3 intelmq root 4096 Aug 28 12:04 .</div><div>drwxr-xr-x 9 intelmq root 4096 Aug 28 12:04 ..</div><div>-rwxrwx--- 1 root root 6846 Aug 22 08:00 BOTS</div><div>-rwxrwx--- 1 root root 1136 Aug 28 12:04 defaults.conf</div><div>drwxr-xr-x 2 root root 4096 Aug 28 12:03 examples</div><div>-rwxrwx--- 1 root root 21650 Aug 22 08:00 harmonization.conf</div><div>-rwxrwx--- 1 root root 24517 Aug 22 08:00 pipeline.conf</div><div>-rwxrwx--- 1 root root 38675 Aug 28 12:04 runtime.conf</div></div><div><br></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Sincerely,<div>Václav Brůžek</div></div></div></div></div></div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 28 Aug 2019 at 13:34, Sebastian Wagner <<a href="mailto:wagner@cert.at">wagner@cert.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hi,<br>
</p>
<p>When you do a manual installation, you also need to create the
directory structure. For this purpose there's a new executable
`intelmqsetup` doing all these steps.<br>
See also the installation documentation:
<a class="gmail-m_-3528109264049887940moz-txt-link-freetext" href="https://github.com/certtools/intelmq/blob/maintenance/docs/INSTALL.md#pypi" target="_blank">https://github.com/certtools/intelmq/blob/maintenance/docs/INSTALL.md#pypi</a></p>
<p>All bots and intelmq actually check if they run privileged as
root and degrade to "intelmq" for security reasons. That's
definitely a bug if that's not working for you as you write that
they are all running as root.</p>
<p>Sebastian<br>
</p>
<div class="gmail-m_-3528109264049887940moz-cite-prefix">On 28/08/2019 13.00, Vaclav Bruzek
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Sebastian,
<div>the whole directory /opt/intelmq/var/ is not created only
/etc/ which was created by me during image build. I've tried
to fix the problem by creating the required folders but then
the the permissions on files in etc were wrong, then intelmq
was unable to load pid files and so on. That was the moment I
decided to ask the mailing list. My guess is that something is
being done differently now. Even weirder is that the whole
container (and intelmq) runs under root so there should be no
errors regarding permissions. </div>
<div><br clear="all">
<div>
<div dir="ltr" class="gmail-m_-3528109264049887940gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">Sincerely,
<div>Václav Brůžek</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, 28 Aug 2019 at 11:57,
Sebastian Wagner <<a href="mailto:wagner@cert.at" target="_blank">wagner@cert.at</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hi Václav,</p>
<p>Is /opt/intelmq/var/log/intelmqctl.log owned by root? If
yes: chown intelmq:intelmq
/opt/intelmq/var/log/intelmqctl.log</p>
<p>Sebastian<br>
</p>
<div class="gmail-m_-3528109264049887940gmail-m_5637262584404227600moz-cite-prefix">On
28/08/2019 11.14, Vaclav Bruzek wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">Hi mailing list,
<div>I've recently upgraded intelmq from version 1.1.2
to 2.0.1. My intelmq runs in Docker. I have a slight
issue with the botnet startup on the new version
(the previous version works ok). Intelmq fails to
start because of the exception present at the bottom
of the mail. Upon further investigation, when the
folder was manually created, other issues started to
pop up. All of them were due to a permission error
on either the files in /opt/intelmq/etc/ or some
else that intelmq tried to access during startup.
Did something change in the setup requirements that
I've overlooked?</div>
<div><br>
</div>
<div>
<div>28/08/2019 09:48:272019-08-28 07:48:27,796 DEBG
'intelmq' stdout output:</div>
<div>28/08/2019 09:48:27Traceback (most recent call
last):</div>
<div>28/08/2019 09:48:27 File
"/usr/local/lib/python3.6/dist-packages/intelmq-2.0.1-py3.6.egg/intelmq/bin/intelmqctl.py",
line 657, in __init__</div>
<div>28/08/2019 09:48:27
logging_level_stream=logging_level_stream)</div>
<div>28/08/2019 09:48:27 File
"/usr/local/lib/python3.6/dist-packages/intelmq-2.0.1-py3.6.egg/intelmq/lib/utils.py",
line 334, in log</div>
<div>28/08/2019 09:48:27 handler =
FileHandler("%s/%s.log" % (log_path, name))</div>
<div>28/08/2019 09:48:27 File
"/usr/lib/python3.6/logging/__init__.py", line
1032, in __init__</div>
<div>28/08/2019 09:48:27
StreamHandler.__init__(self, self._open())</div>
<div>28/08/2019 09:48:27 File
"/usr/lib/python3.6/logging/__init__.py", line
1061, in _open</div>
<div>28/08/2019 09:48:27 return
open(self.baseFilename, self.mode,
encoding=self.encoding)</div>
<div>28/08/2019 09:48:27FileNotFoundError: [Errno 2]
No such file or directory:
'/opt/intelmq/var/log/intelmqctl.log'</div>
<div>28/08/2019 09:48:27</div>
<div>28/08/2019 09:48:27During handling of the above
exception, another exception occurred:</div>
<div>28/08/2019 09:48:27</div>
<div>28/08/2019 09:48:27Traceback (most recent call
last):</div>
<div>28/08/2019 09:48:27 File
"/usr/local/bin/intelmqctl", line 11, in
<module></div>
<div>28/08/2019 09:48:27
load_entry_point('intelmq==2.0.1',
'console_scripts', 'intelmqctl')()</div>
<div>28/08/2019 09:48:27 File
"/usr/local/lib/python3.6/dist-packages/intelmq-2.0.1-py3.6.egg/intelmq/bin/intelmqctl.py",
line 1710, in main</div>
<div>28/08/2019 09:48:27 x =
IntelMQController(interactive=True)</div>
<div>28/08/2019 09:48:27 File
"/usr/local/lib/python3.6/dist-packages/intelmq-2.0.1-py3.6.egg/intelmq/bin/intelmqctl.py",
line 661, in __init__</div>
<div>28/08/2019 09:48:27
logging_level_stream=logging_level_stream)</div>
<div>28/08/2019 09:48:27 File
"/usr/local/lib/python3.6/dist-packages/intelmq-2.0.1-py3.6.egg/intelmq/lib/utils.py",
line 345, in log</div>
<div>28/08/2019 09:48:27 raise
ValueError("Invalid configuration, neither
log_path is given nor syslog is used.")</div>
<div>28/08/2019 09:48:27ValueError: Invalid
configuration, neither log_path is given nor
syslog is used.</div>
</div>
<div> </div>
<div>
<div>
<div dir="ltr" class="gmail-m_-3528109264049887940gmail-m_5637262584404227600gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">Sincerely,
<div>Václav Brůžek</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="gmail-m_-3528109264049887940gmail-m_5637262584404227600mimeAttachmentHeader"></fieldset>
</blockquote>
<pre class="gmail-m_-3528109264049887940gmail-m_5637262584404227600moz-signature" cols="72">--
// Sebastian Wagner <a class="gmail-m_-3528109264049887940gmail-m_5637262584404227600moz-txt-link-rfc2396E" href="mailto:wagner@cert.at" target="_blank"><wagner@cert.at></a> - T: +43 1 5056416 7201
// CERT Austria - <a class="gmail-m_-3528109264049887940gmail-m_5637262584404227600moz-txt-link-freetext" href="https://www.cert.at/" target="_blank">https://www.cert.at/</a>
// Eine Initiative der <a href="http://nic.at" target="_blank">nic.at</a> GmbH - <a class="gmail-m_-3528109264049887940gmail-m_5637262584404227600moz-txt-link-freetext" href="https://www.nic.at/" target="_blank">https://www.nic.at/</a>
// Firmenbuchnummer 172568b, LG Salzburg</pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="gmail-m_-3528109264049887940moz-signature" cols="72">--
// Sebastian Wagner <a class="gmail-m_-3528109264049887940moz-txt-link-rfc2396E" href="mailto:wagner@cert.at" target="_blank"><wagner@cert.at></a> - T: +43 1 5056416 7201
// CERT Austria - <a class="gmail-m_-3528109264049887940moz-txt-link-freetext" href="https://www.cert.at/" target="_blank">https://www.cert.at/</a>
// Eine Initiative der <a href="http://nic.at" target="_blank">nic.at</a> GmbH - <a class="gmail-m_-3528109264049887940moz-txt-link-freetext" href="https://www.nic.at/" target="_blank">https://www.nic.at/</a>
// Firmenbuchnummer 172568b, LG Salzburg</pre>
</div>
</blockquote></div>