[tex-live] bug with file copying in tlpkg/TeXLive/TLUtils.pm

Daniel Villeneuve daniel2villeneuve at videotron.ca
Tue Sep 1 03:15:09 CEST 2009


Hi,

Maybe this is a known bug, but I got caught another time with this 
behavior so I thought I'd report it.

In the sub copy of TLUtils.pm are two lines for determining the right 
mode argument given to chmod:

    $mode=(-x "$infile")? oct("0777"):oct("0666");
    $mode-=umask;

If umask is set as 027, then the subtraction yields 0637, which is a 
quite bizarre permissions setting.
A fix could be to write

    my $mask = (-x "$infile")? oct("0777"):oct("0666");
    $mode = $mask - (umask() & $mask);

which yields 0640 (more usual).

Regards,
--
Daniel Villeneuve




More information about the tex-live mailing list