From ffe6e66c50dd9c27088f242e7c4fe8fa55875c49 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 30 May 2007 11:33:38 +0000 Subject: generous log permissions --- it.class | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'it.class') diff --git a/it.class b/it.class index 8e7dbcd..04022e7 100644 --- a/it.class +++ b/it.class @@ -36,11 +36,13 @@ function log($name /* ... */) { $args = func_get_args(); $line = date("Y-m-d H:i:s") . "\t" . implode("\t", array_slice($args, 1)) . "\n"; + $fn = $GLOBALS['ULTRAHOME'] . "/log/$name-" . date('Ymd'); - if ($fh = fopen($GLOBALS['ULTRAHOME'] . "/log/$name-" . date('Ymd'), "a")) + if ($fh = fopen($fn, "a")) { fputs($fh, $line); fclose($fh); + @chgrp($fn, "www"); } } -- cgit v1.2.3