Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having issues with intelmq.bots.collectors.file.collector_file #2326

Closed
x8006 opened this issue Mar 6, 2023 · 3 comments
Closed

Having issues with intelmq.bots.collectors.file.collector_file #2326

x8006 opened this issue Mar 6, 2023 · 3 comments
Labels

Comments

@x8006
Copy link

x8006 commented Mar 6, 2023

Hello everybody,

I would like to start by saying how interesting and effective this tool is.

I am trying to use the File Collector but unable to to do so. I am using manager and added the file collector bot, but even though I have entered correct path, I am getting the following error:

2023-03-06 10:17:19,415 - File-Collector - INFO - FileCollectorBot initialized with id File-Collector and intelmq 3.1.0 and python 3.8.10 (default, Nov 14 2022, 12:59:47) as process 118089.
2023-03-06 10:17:19,415 - File-Collector - INFO - Bot is starting.
2023-03-06 10:17:19,486 - File-Collector - ERROR - Bot initialization failed.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/intelmq/lib/bot.py", line 214, in __init__
    self.init()
  File "/usr/lib/python3/dist-packages/intelmq/bots/collectors/file/collector_file.py", line 46, in init
    raise exceptions.InvalidArgument('path', got=self.path,
intelmq.lib.exceptions.InvalidArgument: Argument 'path' is invalid. Should be of type: directory. Got '/tmp/test1/'.
2023-03-06 10:17:19,487 - File-Collector - INFO - Bot stopped.

However the path is a directory

$ file /tmp/test1/
/tmp/test1/: directory

Am I missing something ??

Thanks.

@x8006
Copy link
Author

x8006 commented Mar 6, 2023

UPDATE: If I use /tmp/ directory everything works fine but if I create a new directory and put files into that directory, intelmq can not access it ?!

I have used 777 permission on the folder but still not working.

@sebix
Copy link
Member

sebix commented Mar 9, 2023

Did you start the Bot with the Manager? Is the result different, when you run intelmqct start .. on the command line? (If your webserver has a confined env (PrivateTmp) its subprocess may not access other dirs)

To check what IntelMQ sees, can you please run

sudo -u intelmq python3 -c "import pathlib; pathlib.Path('/tmp/test1/').stat()"

@sebix
Copy link
Member

sebix commented Nov 29, 2023

Closing because of inactivity. Please reopen if needed.

@sebix sebix closed this as completed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants