Avast shields are blocking PDF creation with LuaLatex

Hi everyone,

I am using MikTex and TexStudio (all the latest versions) in my Windows 10 computer. All worked fine until I had to change the latex compiler to either LuaLatex or XeLatex. For the latex document in question it is preferred to use the LuaLatex compiler.
When compiling the document I receive an error "I can’t write on file ‘x.pdf’.

After searching the web for a few days I found a similar problem (https://forum.avast.com/index.php?topic=235490.msg1553481#msg1553481) in which the same problem is linked to the Avast products.

For now I am able to compile the document IF AND ONLY IF I disable all the shields in Avast. But this is by no means a safe solution to the problem.

Has anyone encountered a similar problem before and knows how to solve it? Thanks

Reported to Avast let’s see if that helps. Sorry, I don’t know or use the program.

Hello,
is there some Avast message?
What Avast products do you use (which components are installed)?
Can you try do disable only part (shield) of the product to identify which Avast part is causing it?
Is the latex compiler digitally signed?

I can only guess that it could be caused by Ransomware shield, but it is only a guess.

Milos

I could have been more elaborate on that.
There are no message given by Avast (that’s why it took me some days before I found this).
I am using Avast Premium Security, with the products: AntiVirus, Cleanup Premium and Password Manager. Beside that I use Avast AntiTrack and Avast Driver Updater.

I have already tried to disable the separate shields but no luck at all. So there is no single shield responsible as it seams, but a combination of shields.

All the files in the MikTex and TexStudio product are not signed.

Solved this issue.

In Avast I have added the following apps to allow them in the Ransomware shield:

C:\Program Files\MiKTeX 2.9\miktex\bin\x64\lualatex.exe
C:\Program Files\MiKTeX 2.9\miktex\bin\x64\xdvipdfmx.exe

In TexStudio the build commands are set to:

XeLatex → xelatex.exe -shell-escape -output-driver=“xdvipdfmx -z 0” %.tex
LuaLatex → lualatex.exe -synctex=1 -interaction=nonstopmode %.tex