LaTeX forum ⇒ TeX Live and MacTeXWhy compiling LaTex examples require 'sudo'? Topic is solved

Information and discussion about TeX Live distribution for all platforms (Windows, Linux, Mac OS X) and the related MacTeX: installing, updating, configuring
Posts: 21
Joined: Thu Aug 25, 2016 2:24 am

Why compiling LaTex examples require 'sudo'?

Postby erwann » Thu Aug 25, 2016 4:17 am

Why are TexLive's doc files owned by root? Would it be a good idea to \chown them to a non root user?

  1. texmf-dist my-mac$ ls -ld doc/
  2. drwxr-xr-x 49 root staff 1666 Aug 24 19:31 doc/
  4. $echo $PWD
  5. /usr/local/texlive/2016/texmf-dist/doc/latex/lettre
  7. $ pdflatex letex1.tex
  8. This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)
  9. restricted \write18 enabled.
  10. entering extended mode
  11. ! I can't write on file `letex1.log'.
  13. $sudo pdflatex letex1.tex
  14. Password:
  15. This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)
  16. restricted \write18 enabled.
  17. entering extended mode
OS X 10.11
pdfTeX 3.14159265-2.6-1.40.17


User avatar
Site Moderator
Posts: 3517
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Aug 25, 2016 6:15 am

Installing TeX Live in your home directory would have made the whole installation yours, no need for the super user.

Everything in /usr/ is protected to be accessed only with sudo rights. And that is a good thing. You should keep it that way ;-)

You should never create your own documents, no matter if LaTeX or anything else in /usr/. Always do it somewhere in your /home/ directory (or a subdir of it).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Return to “TeX Live and MacTeX”

Who is online

Users browsing this forum: No registered users and 3 guests