[NTG-context] Feature Request: Set Output Directory
thangalin at gmail.com
Mon Jan 13 04:24:18 CET 2014
Summary: If the --result parameter includes a path then ConTeXt should
assume that that directory is writable thus read/write its temporary
flies at that location instead of the current working directory (CWD).
Consider the following three accounts:
- ConTeXt installation account (e.g., "context")
- Web server account (e.g., "web")
- Application account (e.g., "app")
ConTeXt is run using the web server account. The web server's CWD is
set to the application directory. For security reasons, the "web"
account may not create files in the "app" account.
When ConTeXt is called by the "web" account, the CWD is an "app"
account subdirectory. This subdirectory contains scores of .tex input
files that control various themes for the final rendered document.
Many different users, through this web-based application, create
different content .tex files.
I would like to run context as the web user within the app directory,
where the input .tex files are located; effectively, as the "web"
account, this would look like:
Since the "web" account cannot write to the "app" directory, this
causes the following error:
! I can't write on file `book.log'.
The following is also not possible as the "web" account:
This fails because the book.tex file includes files that are in the
"app" directory, which cannot be found. Since the "book.tex" file will
be in a different directory for every user, a symbolic link in each
book directory would probably resolve the issue, but that's a bit
I have updated TEXMFCACHE in texmfcnf.lua to point to
/var/cache/context/texmf-cache/ (world-writable), but it didn't help.
It seems that ConTeXt assumes write permissions to the current working
directory, which is not a valid assumption.
Also, the --result parameter should be listed in the --help page (or
the --help page should list --all as a way to see all the options).
More information about the ntg-context