[Tex/LaTex] BibTeX permission denied

bibtextexlivetexworksUbuntu

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?

Best Answer

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!