Bug 108382 - Latex can't create required fonts --> permission?
Latex can't create required fonts --> permission?
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: tetex (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-28 16:00 EST by Jochen Weiss
Modified: 2013-07-02 18:58 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-04-28 07:11:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jochen Weiss 2003-10-28 16:00:29 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.1; Linux)

Description of problem:
Font creation as normal user not possible and latex exits with errors while trying to do the font creation

It works fine if latex is run as root. Here is the latex output upon executing it as normal user:

Font metrics written on ecbx1000.tfm.
Output written on ecbx1000.600gf (256 characters, 50044 bytes).
Transcript written on ecbx1000.log.
cp: cannot create regular file `/var/lib/texmf/tfm/jknappen/ec/tfm6239.tmp': Permission denied
kpathsea: Appending font creation commands to missfont.log.
! Font T1/cmr/bx/n/10=ecbx1000 at 10.0pt not loadable: Metric (TFM) file not fo
und.


Version-Release number of selected component (if applicable):
tetex-2.0.2-8

How reproducible:
Always

Steps to Reproduce:
1.run latex as normal user on any .tex file
2.
3.
    

Actual Results:  latex exits with errors indicating font creation was not successful due to permission problems

Expected Results:  fonts should be created and latex should compile .tex file successfully.

Additional info:

Clearly due to permission problems on the /var/lib/texmf directory.
Comment 1 Tim Waugh 2003-10-29 04:07:09 EST
Works for me.  What does 'rpm -V tetex' say?  The permissions on that directory
are (from the RPM manifest) drwxrwxrwt.  What does ls -lR /var/lib/texmf say for
you?
Comment 2 Jochen Weiss 2003-10-31 10:18:57 EST
rpm -V output: 
 
S.5....T   /usr/share/texmf/web2c/amstex.fmt 
S.5....T   /usr/share/texmf/web2c/bamstex.fmt 
S.5....T   /usr/share/texmf/web2c/bplain.fmt 
S.5....T   /usr/share/texmf/web2c/cont-en.efmt 
S.5....T   /usr/share/texmf/web2c/etex.efmt 
..5....T   /usr/share/texmf/web2c/metafun.mem 
S.5....T   /usr/share/texmf/web2c/mf.base 
S.5....T   /usr/share/texmf/web2c/mpost.mem 
S.5....T   /usr/share/texmf/web2c/mptopdf.efmt 
S.5....T   /usr/share/texmf/web2c/omega.oft 
S.5....T   /usr/share/texmf/web2c/pdfetex.efmt 
S.5....T   /usr/share/texmf/web2c/pdftex.fmt 
S.5....T   /usr/share/texmf/web2c/tex.fmt 
 
Here is the ls -lR /var/lib/texmf 
/var/lib/texmf: 
total 16 
-rw-r--r--    1 root     root         1137 Oct 28 15:50 ls-R 
drwxr-xr-x    4 root     root         4096 Oct 28 15:33 pk 
drwxrwxrwt    3 jochen   jochen       4096 Oct 28 13:16 source 
drwxr-xr-x    3 root     root         4096 Oct 17 18:42 tfm 
 
Comment 3 Tim Waugh 2003-10-31 10:23:04 EST
I think you forgot the R flag.
Comment 4 Jeff McCune 2004-05-13 15:28:18 EDT
He did, but it doesn't matter.  You can see that pk and tfm are only
writable by root.  These directories need to be writable by any user
in order to allow font generation to work.  This is broken for me as
well, and all of my users.  It's hanging up texmac.

Here's the result of my ls -lR /var/lib/texmf on a fresh installation
of Fedora Core 1:

[root@noether kane]# ls -lR /var/lib/texmf/
/var/lib/texmf/:
total 20
-rw-r--r--  1 root   root  5386 May 12 09:54 ls-R
drwxr-xr-x  3 root   root  4096 May 12 09:49 pk
drwxrwxrwt  3 mccune staff 4096 May 13 10:36 source
drwxr-xr-x  3 root   root  4096 May 12 09:49 tfm

/var/lib/texmf/pk:
total 4
drwxr-xr-x  3 root root 4096 May 12 09:49 cx

/var/lib/texmf/pk/cx:
total 8
drwxr-xr-x  2 root root 8192 May 12 09:49 localfont

/var/lib/texmf/pk/cx/localfont:
total 0

/var/lib/texmf/source:
total 4
drwxrwxrwt  3 mccune staff 4096 May 13 10:36 jknappen

/var/lib/texmf/source/jknappen:
total 4
drwxrwxrwt  2 mccune staff 4096 May 13 10:36 sauter

/var/lib/texmf/source/jknappen/sauter:
total 4
-rw-r--r--  1 mccune staff 34 May 13 10:36 cmr14.mf

/var/lib/texmf/tfm:
total 4
drwxr-xr-x  4 root root 4096 May 12 09:49 jknappen

/var/lib/texmf/tfm/jknappen:
total 8
drwxr-xr-x  2 root root 4096 May 12 09:49 ec
drwxr-xr-x  2 root root 4096 May 12 09:49 sauter

/var/lib/texmf/tfm/jknappen/ec:
total 0

/var/lib/texmf/tfm/jknappen/sauter:
total 0
Comment 5 Jeff McCune 2004-05-13 15:34:59 EDT
I forgot to add one thing to my comment.  From the texmacs webpage,
they mention the following:
http://www.texmacs.org/tmweb/download/unix.en.html

Appendix A. Possible problems
TeXmacs runs fine, but certain fonts are not displayed correctly.

Solution: This problem may have several causes:

    * You use a recent version (>= 7.3) of RedHat Linux or one of its
clones. On such systems, the installation of TeTeX is bugged and you
need to change some permissions in order to allow font generation by
Metafont. As root, type

    chmod -R a+rw /var/lib/texmf/*

I haven't verified this with the TeTeX project, but I believe that the
installation deafult for the tetex package should be to have a
world-writable /var/lib/texmf/ all the way down through it's tree.

What I need to know is that if this doesn't get fixed in the near
future, is it acceptable to perform this fix manually for my users, or
are there security or other implications I need to be worried about?
Comment 6 Tim Waugh 2004-05-13 17:03:27 EDT
On my fresh installation of FC2-in-development (but the tetex package
isn't much different from FC1), I see drwxrwxrwt directories all the
way down.

$ find /var/lib/texmf -type d | xargs ls -ld
drwxrwxrwt  5 root root 4096 Apr 29 12:36 /var/lib/texmf
drwxrwxrwt  3 tim  tim  4096 Apr 29 12:36 /var/lib/texmf/pk
drwxrwxrwt  3 tim  tim  4096 Apr 29 12:36 /var/lib/texmf/pk/ljfour
drwxrwxrwt  3 tim  tim  4096 Apr 29 12:36
/var/lib/texmf/pk/ljfour/jknappen
drwxrwxrwt  2 tim  tim  4096 Apr 29 12:36
/var/lib/texmf/pk/ljfour/jknappen/ec
drwxrwxrwt  3 tim  tim  4096 Apr 29 12:35 /var/lib/texmf/source
drwxrwxrwt  3 tim  tim  4096 Apr 29 12:35 /var/lib/texmf/source/jknappen
drwxrwxrwt  2 tim  tim  4096 Apr 29 12:36
/var/lib/texmf/source/jknappen/ec
drwxrwxrwt  3 tim  tim  4096 Apr 29 12:35 /var/lib/texmf/tfm
drwxrwxrwt  3 tim  tim  4096 Apr 29 12:35 /var/lib/texmf/tfm/jknappen
drwxrwxrwt  2 tim  tim  4096 Apr 29 12:36 /var/lib/texmf/tfm/jknappen/ec

Are you running latex as root, and could that be messing up permissions?
Comment 7 Jeff McCune 2004-05-13 17:48:04 EDT
Thanks for the quick reply.  I think you hit the nail on the head. 
Here's what I'm thinking:  Again, on my FC-1, which is "pristine" for
us, but is kickstarted, so it's not really a pristine FC-1 install. 
We do stuff with TeX in the postinstall script, so I can assume it
gets run as root at some point, as you suggested.

  [root@hooloovoo root]# rpm -ql tetex | grep /var/lib/texmf
  /var/lib/texmf
  /var/lib/texmf/ls-R

So, it looks like the tetex package isn't really mucking with anything
but the base directory itself.

I believe it's *still* a bug in tetex, however, because we should be
able to run the program as root.  You'll notice in my directory
listing and in Jochen's listing, the /var/lib/texmf/source directory
is owned by our respective users, yet it gets the proper chmod
permissions.  The other directories don't, which are owned by root. 
If I run tetex as root, it should properly chmod the directories it
creates.  Shouldn't it?
Comment 8 Jindrich Novy 2005-09-08 11:24:35 EDT
Are you still able to reproduce it with tetex-3.0?
Comment 9 Jindrich Novy 2006-04-28 07:11:47 EDT
Closing NOTABUG because of no feedback.

Note You need to log in before you can comment on or make changes to this bug.