# I can only compile tex files in my Dropbox directory

As the title says, when I try to compile a simple tex file located in my Dropbox directory, everything works fine and a pdf is produced. When I try to compile the same tex file anywhere else, I get the following error :

I can't write on file questionnaire2.pdf'. \end{document}


the file "questionnaire2.tex" is :

\documentclass[letterpaper,12pt]{article}

\begin{document}
foo
\end{document}
`

I am compiling using MiKTeX 4.5.

Edit : I am also making sure that no pdf reader is open while I try to compile.

• Have you this PDF opened during compilation? Jan 5 at 19:14
• either another program (eg acrobat) is locking the file or you do not have write permissions in the folder in which pdftex is running (which is not necessarily the folder with your document) Jan 5 at 19:16
• Which pdf viewer are you using? Jan 5 at 20:03
• @PrzemysławScherwentke No it is not opened. Jan 5 at 20:09
• @Bernard I use no pdf viewer since no pdf is built. Usually, I use the TexLive pdf viewer or Sumatra Pdf. I also sometimes use Acrobat Reader. Jan 5 at 20:10