## LaTeX forum ⇒ TeX Live and MacTeX ⇒ Why 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
erwann
Posts: 21
Joined: Thu Aug 25, 2016 2:24 am

### Why compiling LaTex examples require 'sudo'?

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

`texmf-dist my-mac\$ ls -ld doc/drwxr-xr-x  49 root  staff  1666 Aug 24 19:31 doc/ \$echo \$PWD/usr/local/texlive/2016/texmf-dist/doc/latex/lettre \$ pdflatex letex1.texThis is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)  restricted \write18 enabled.entering extended mode! I can't write on file `letex1.log'. \$sudo pdflatex letex1.texPassword:This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex)  restricted \write18 enabled.entering extended mode`
OS X 10.11
pdfTeX 3.14159265-2.6-1.40.17

Tags:

Johannes_B
Site Moderator
Posts: 3602
Joined: Thu Nov 01, 2012 4:08 pm
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.