Uploaded image for project: 'LaTeX'
  1. LaTeX
  2. LATEX-119

Files produced by pdflatex are root on linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.16
    • 1.10
    • PDF
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      To produce a pdf from some latex files, the directory containing the latex files is mounted on a docker container. Then, the pdflatex command is executed inside this container.

      The way containers users are managed on linux (see links below), the files produced by pdflatex are root on the mounted volume.

      One of the direct impact of this problem is that calling mvn clean install twice on the pdf-latex module will fail, because the current user does not have the rights to remove files owned by the root user.

      Some online resources:

      For your final question: mounting host volumes generally leads to permission issues - if you, for example, create files inside the container, they will end up with the large UIDs on the host side (i.e., the temporary UIDs I mentioned above). In your case, only root has access to that file per default. You'll need to chown as appropriate. You can run docker run --user uid:group and thus override the temporary UIDs/GIDs which dockerd normally creates for you.

      at https://stackoverflow.com/a/63187683/153102

      https://github.com/moby/moby/issues/3206 (specifically: https://github.com/moby/moby/issues/3206#issuecomment-774099715)

      Attachments

        Activity

          People

            vmassol Vincent Massol
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: