I recently upgraded from Ubuntu 12.04 to Ubuntu 13.10 and had to reinstall TexLive 2013 and TeXWorks. Ordinary typesetting with pdfLaTeX works fine. However, when I try to run BibTeX, the only console output is "Permission denied" and it doesn't compile the bibliography.

I have tried compiling on another machine with the same tex and bib files and it works fine, so I know my source files are fine and the problem must be with how LaTeX is installed.

I thought since the error mentioned permissions, that somehow I had installed it so that only the root user can access BibTex. I tried opening TeXWorks as root (via sudo texworks) and then used that version of TeXWorks to compile, but it couldn't even compile using pdfLaTeX.

How can I change the settings of TeXWorks and/or TeXLive to make BibTeX compile again?

  • 2
    At the command line what does the command ls -l $(which bibtex) give you? It should start with the sequence -rwxr-xr-x. Also, please do not run GUI programmes (or TeX commands!) as root. It really is a Very Bad Idea, even if it is because you got an error concerning permissions.
    – cfr
    Jan 2, 2014 at 3:08
  • It returns -l: command not found If I just type in which bibtex in the terminal it gives /opt/texbin/bibtex Jan 2, 2014 at 4:03
  • ls -l /opt/texbin/bibtex - did you miss the ls out? You certainly have that command. -l is the flag passed to ls. It will give you that error if you use it alone.
    – cfr
    Jan 2, 2014 at 4:05
  • I missed the ls. Running it gave -rwxr-xr-x 1 root root 161184 May 2 2013 /opt/texbin/bibtex Jan 2, 2014 at 4:53
  • @IsaacVandermeulen If you're not able to resolve the problem and are forced to reinstall, you can do so with one command using install-tl-ubuntu
    – scottkosty
    Jan 2, 2014 at 10:52

1 Answer 1


I found the problem. I had two different directories for typesetting saved in the preferences of TeXWorks. One directory was owned by root and the other by my user. Both directories contained a copy of BibTeX and TeXWorks was automatically trying to use the one owned by root, returning the permission error. I removed the directory owned by root from the preferences and it is working again!

  • You should not need to own the directory in which bibtex is located. All you need to own is the directory in which the typesetting takes place which is usually where the document you are working on is located. You do need read and execute access to the directory containing bibtex and to bibtex but you should not typically own them. It is not necessarily bad but it is definitely not required for things to work. It sounds as if something else is slightly awry with your system.
    – cfr
    Jan 2, 2014 at 23:55
  • That's probably what it was then. The other one probably just didn't have read execute access for the regular user. Jan 3, 2014 at 5:41

You must log in to answer this question.

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