Bug in TL 2024? Cannot create file in upper directory.

Norbert Preining norbert at preining.info
Sat Apr 6 18:26:52 CEST 2024


I am not an expert in luatex, but ..

> \directlua{
> local name = "../Testfile"
> local myDocument = assert (io.open (name, "w"), [[Could not open file "]] ..
> name .. [[" for writing]])
>> }

The news https://tug.org/texlive/doc/texlive-en/texlive-en.html#news


	Lua-level checks for writing to files now similar to the TeX-level checks.

which means writing to files outside the CWD is not allowed anymore.

This can be seen in tl/2024/texmf-dist/web2c/texmf.cnf:

% Do we allow TeX \input or \openin (openin_any), or \openout
% (openout_any) on filenames starting with `.' (e.g., .rhosts) or
% outside the current tree (e.g., /etc/passwd)?
% a (any)        : any file can be opened.
% r (restricted) : disallow opening dot files
% p (paranoid)   : as `r' and disallow going to parent directories, and
%                  restrict absolute paths to be under $TEXMFOUTPUT.
openin_any = a
openout_any = p

So openout_any = p = paranoid = disallow going to parent directories

Best regards


PREINING Norbert                              https://www.preining.info
arXiv / Cornell University   +   IFMGA Guide   +   TU Wien  +  TeX Live
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13

More information about the tex-live mailing list.