7228: Set umask to 002 so cache files are created writable other processes with same...
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 23 Sep 2015 17:00:08 +0000 (13:00 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 23 Sep 2015 17:00:08 +0000 (13:00 -0400)
services/api/script/crunch-dispatch.rb

index 27cb82115b2f7993bce20b7a589bdb62eccad619..4a1fdbce758d7b552f529419f7c37f970299d298 100755 (executable)
@@ -1,5 +1,9 @@
 #!/usr/bin/env ruby
 
+# We want files written by crunch-dispatch to be writable by other processes
+# with the same GID, see bug #7228
+File.umask(0002)
+
 require 'shellwords'
 include Process
 
@@ -747,6 +751,7 @@ class Dispatcher
 
   def run
     act_as_system_user
+    User.first.group_permissions
     $stderr.puts "dispatch: ready"
     while !$signal[:term] or @running.size > 0
       read_pipes