Python Django Latex Permissions Problem

Discussion in 'Python' started by I-T, Nov 24, 2008.

  1. I-T

    I-T Guest

    I have a python/django webapp running with apache2. It executes system
    commands for getting a pdf generated by pdflatex from a .tex file and
    a couple of image files which it also generates.

    The permssions from ls-l for all the created files is:-
    -rw-r--r-- 1 www-data www-data

    The files are being created in /tmp/pdfscratch{id} created from the
    script and so is the directory.

    pdflatex fails with the following error message:-

    This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
    %&-line parsing enabled.
    entering extended mode
    ! I can't write on file `uber.log'.
    Please type another transcript file name:
    ! Emergency stop
    ! ==> Fatal error occurred, no output PDF file produced!

    Its supposed to write to this directory. I have a feeling that
    pdflatex is trying to generate files using some weird access
    credentials that dont have access to /tmp/pdfscratch{id}

    What do you guys think could be the problem/solution

    Thanks in advance
     
    I-T, Nov 24, 2008
    #1
    1. Advertising

  2. I-T

    I-T Guest

    It was a very unlikely problem. Apparently although apache was
    configured, someone in the past had run some instances of manage.py
    Maybe they were stuck or they were running in the background.

    Once all python instances were killed and Apache was restarted,
    everything worked as a breeze.

    Thanks for the help though

    On Nov 25, 2:30 pm, Nick Craig-Wood <> wrote:
    > I-T <> wrote:
    > >  I have a python/django webapp running with apache2. It executes system
    > >  commands for getting a pdf generated by pdflatex from a .tex file and
    > >  a couple of image files which it also generates.

    >
    > >  The permssions from ls-l for all the created files is:-
    > >  -rw-r--r-- 1 www-data www-data

    >
    > >  The files are being created in /tmp/pdfscratch{id} created from the
    > >  script and so is the directory.

    >
    > >  pdflatex fails with the following error message:-

    >
    > >  This is pdfTeXk, Version 3.141592-1.40.3 (Web2C  7.5.6)
    > >   %&-line parsing enabled.
    > >  entering extended mode
    > >  ! I can't write on file `uber.log'.
    > >  Please type another transcript file name:
    > >  ! Emergency stop
    > >  !  ==> Fatal error occurred, no output PDF file  produced!

    >
    > >  Its supposed to write to this directory. I have a feeling that
    > >  pdflatex is trying to generate files using some weird access
    > >  credentials that dont have access to /tmp/pdfscratch{id}

    >
    > Unlikely - it takes root to change user and I wouldn't have thought
    > any of the files would be setuid.
    >
    > Try chdir to /tmp/pdfscratch{id} first would be my suggestion.
    >
    > --
    > Nick Craig-Wood <> --http://www.craig-wood.com/nick
     
    I-T, Nov 28, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Scott Allen
    Replies:
    0
    Views:
    440
    Scott Allen
    Jul 13, 2004
  2. Curt K
    Replies:
    0
    Views:
    566
    Curt K
    Nov 3, 2006
  3. John Posner

    Question on Django and Django Book

    John Posner, Nov 13, 2010, in forum: Python
    Replies:
    0
    Views:
    320
    John Posner
    Nov 13, 2010
  4. eGenix Team: M.-A. Lemburg
    Replies:
    0
    Views:
    140
    eGenix Team: M.-A. Lemburg
    Jun 18, 2013
  5. Gary Roach
    Replies:
    0
    Views:
    137
    Gary Roach
    Jan 2, 2014
Loading...

Share This Page