Template2 icon indicating copy to clipboard operation
Template2 copied to clipboard

Default file permissions [rt.cpan.org #84840]

Open atoomic opened this issue 7 years ago • 1 comments
trafficstars

Migrated from rt.cpan.org#84840 (status was 'new')

Requestors:

From [email protected] on 2013-04-24 20:21:25:

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.

atoomic avatar Oct 05 '18 16:10 atoomic

Related issue is https://github.com/Perl-Toolchain-Gang/File-Temp/issues/15

toddr avatar Oct 05 '18 18:10 toddr