From: Marius Gavrilescu Date: Tue, 3 Feb 2015 13:42:58 +0000 (+0200) Subject: Make sure work directory is world-searchable X-Git-Tag: 5999.000_005~62 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=01d5951581c7d82b42a3cc78942287ead79d2ca3;p=gruntmaster-daemon.git Make sure work directory is world-searchable --- diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 07b6fb6..1e5d8b2 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -165,7 +165,9 @@ sub run{ $db = Gruntmaster::Data->connect($ENV{GRUNTMASTER_DSN} // 'dbi:Pg:'); Log::Log4perl->init('/etc/gruntmasterd/gruntmasterd-log.conf'); get_logger->info("gruntmasterd $VERSION started"); - chdir tempdir 'gruntmasterd.XXXX', CLEANUP => 1, TMPDIR => 1; + my $dir = tempdir 'gruntmasterd.XXXX', CLEANUP => 1, TMPDIR => 1; + chmod 0711, $dir; + chdir $dir; while (1) { my $job = $db->jobs->search({daemon => undef}, {rows => 1})->first; got_job $job if defined $job;