LaTeX content in parent/sibling directories

error: epstopdf Output filename not allowed in restricted mode

may occur if you include .eps files not in the same directory or a subdirectory of the .tex file.

LaTeX by default cannot traverse upwards from the current directory to a file that is in a directory above or adjacent to your current level. This is generally a good security choice.

Sometimes however, users want to bypass this security as described below.

Command line fix

include the --shell-escape option in your pdflatex command


pdflatex --shell-escape myfile.tex

TeXmaker fix

Under Options→Configure add --shell-escape right after pdflatex in the PdfLaTeX command box.


This example shows when --shell-escape is needed. Assuming files




This triggers the error until --shell-escape is used.