[texhax] getting around the umask problem (Re: tug and mavericks)

Thomas Schneider schneidt at mail.nih.gov
Sun Mar 30 21:52:51 CEST 2014

Your posting inspired me to try to get latex running myself.  I
recently installed the TeX Collection 2014 on my new MacBook Air
running OS X 10.9.2.  However, it failed to run.  I got this message:

/usr/local/texlive/2013/texmf-dist/web2c/texmf.cnf: Permission denied

It turns out that when a user like me wants to have some extra
security on their system, we set:

umask 077

in the shell start up script.  You can check your permissions by
typing 'umask on the command line:

   % umask

Unfortunately when one does this and installs texlive the permissions
are not set correctly for the texlive directory.  This occured last
year and a fight ensued ending with nothing being done.  As far as I'm
concerned a package should set its own permissions ON ITS OWN FILES
correctly INDEPENDENTLY OF THE USER.  But some people don't see it
that way because they think that when the user sets a restrictive
umask the user means that to apply to all files instead of only their
own files.  As a result people who want to mask their file permissions
(but not installed programs from elsewhere) to be safer will get a
defective TeX installation.  Since tex is open, I see no reason to
partially restrict access to the files - my installation was partially
readable which makes no sense at all.

Fortunately the solution is simple.  On the command line type:

sudo chmod -R go+rX /usr/local/texlive/2013/*

You will have to type your systems administrator password to get sudo
to run the chmod command.  The -R makes it recursively go through the
directory structure of texlive.  The part 'go+rX' means that group and
other users get read and execute permission of every file.  The 'X'
instead of 'x' means that only executable or directories are made
executable (i.e., what one wants).  With my mask, the root user
already has read and execute permissions, but 'go' could be replaced
with 'a' to be more general.  Also, this only works for the 2013
installation, not the next one.

So the fully general command (but slower because it has more to do)

sudo chmod -R a+rX /usr/local/texlive/*

I urge the developers to include this line into the installation
package so that the permissions are set correctly.  If you think it is
slow (it takes a few seconds) do a test for umask == 77 or (I think)
umask != 0.


  Thomas D. Schneider, Ph.D.
  Senior Investigator
  National Institutes of Health
  National Cancer Institute
  Center for Cancer Research
  Gene Regulation and Chromosome Biology Laboratory
  Molecular Information Theory Group
  Frederick, Maryland  21702-1201
  schneidt at mail.nih.gov
  http://schneider.ncifcrf.gov (current link)
  http://alum.mit.edu/www/toms (permanent link)

More information about the texhax mailing list