summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2007-05-30 11:33:38 +0000
committerUrban Müller2007-05-30 11:33:38 +0000
commitffe6e66c50dd9c27088f242e7c4fe8fa55875c49 (patch)
tree2a83c15b854a27aaceddcdfb19041420b6cf9c0b
parent987b99cb033a4f7bd8586a3d802a0b6e72ffdb4e (diff)
downloaditools-ffe6e66c50dd9c27088f242e7c4fe8fa55875c49.tar.gz
itools-ffe6e66c50dd9c27088f242e7c4fe8fa55875c49.tar.bz2
itools-ffe6e66c50dd9c27088f242e7c4fe8fa55875c49.zip
generous log permissions
-rw-r--r--it.class4
1 files changed, 3 insertions, 1 deletions
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");
}
}