I'm trying to scan some directories with Linux Malware Detect (command-line command maldet):

maldet -a /SOMETHING\ 1/

But I get:

maldet(13857): {scan} invalid path /SOMETHING 1/

I've tried quoting the directory argument and can't think of anything else, it also seems to have the right name as it stands in the error message.

So maybe maldet doesn't support scanning directories with spaces?

I found an workaround:

maldet -a .

But why can't I use the directory in question as an argument to maldet?

1 Answer 1


I just looked at the maldet source code, and can see that the bug lies here, where paths are not properly quoted.

Because the path is not properly quoted, the logic being performed fails (as it only looks at part of the path). Frankly, I can't even tell what the end goal of that part of the function is because the code is so full of redundancy, bugs, and stuff that really just makes no sense at all. :-(

I would raise an issue on the bug tracker and get the author to fix it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .