Subject: | Default file permissions |
I ran into an issue with compiled templates. We have two processes (running as two different users) using templates. The first time of the processes uses a template the compiled version is written to disk with 0600 permissions so when the other process tries to load the compiled template it fails.
The root cause is that File::Temp creates files with 0600 permissions and there is no way to override that.
Template Toolkit should have an option to override the default 0600 permissions in Template::Document's write_perl_file method.
See also rt# 82516 https://rt.cpan.org/Ticket/Display.html?id=82516
My work around for this issue was to monkey patch Template::Document to chmod the newly created file.