Hi remus
What happens if you try that same test with a clean file?
Never mind, I found the answer the answer on your post at the Debian User Forums.
It sounds to me like it's working. As I understand it, it does not stop you from writing an infected file
to a directory, rather, it stops you from reading (or executing, which requires reading) the file once
it is there. Prior to saving a file, a test is first done to see if it exists so that you can confirm whether
you wish to overwrite it. If the test is done by attempting to open the file and checking if it exists,
that might trigger clamfs to block the attempt.
Personally, I want to offer you a pat on the back for your perseverance and what you have achieved.
I suggest you package it up into an extension and submit it so that others can do some testing too.
Under Comments: in the info file, give a step by step on how to set it up, including an example that
clearly shows which directory is being protected and which is the access point to that directory.
Once again, congratulations on your accomplishment.