From 8399d8db11e424919b6b4d9c615f732f96037cf5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 20 Apr 2010 18:36:21 +0100 Subject: [PATCH] Use umask 007; preserve perms on logfiles --- crontab.part.INO | 6 +++--- stump/etc/modenv.INO | 3 ++- webstump/scripts/file-message.pl | 2 +- webstump/scripts/webstump.pl | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crontab.part.INO b/crontab.part.INO index a55d824..764da64 100644 --- a/crontab.part.INO +++ b/crontab.part.INO @@ -3,7 +3,7 @@ # ssh webstump@chiark live-mtm/install-aggregates # #m h d m dow -50 7 * * 1,4 savelog live-%ABBREV%/xlog/log/%GROUP%/event.log -51 7 12 * * savelog live-%ABBREV%/errs -52 7 12 * * savelog live-%ABBREV%/webstump/log/webstump.log +50 7 * * 1,4 savelog -p live-%ABBREV%/xlog/log/%GROUP%/event.log +51 7 12 * * savelog -p live-%ABBREV%/errs +52 7 12 * * savelog -p live-%ABBREV%/webstump/log/webstump.log 53 7 * * 1 find live-%ABBREV%/xlog/log/%GROUP%/public -mtime +14 -print0 | xargs -r0 rm -- diff --git a/stump/etc/modenv.INO b/stump/etc/modenv.INO index 1715474..382861e 100755 --- a/stump/etc/modenv.INO +++ b/stump/etc/modenv.INO @@ -12,6 +12,8 @@ set -e +umask 007 + ####################################################################### # this is the root directory where moderation software & config # resides. Make sure that sendmail is in the PATH. @@ -288,6 +290,5 @@ export BEGIN_PGP_SIGNED_MESSAGE BOT_SUBJECT_PREFIX # if [ "x$1" != "x" ]; then - umask 077 antivirus | decodeBase64 | "$@" fi diff --git a/webstump/scripts/file-message.pl b/webstump/scripts/file-message.pl index 1585f86..a7a07d2 100755 --- a/webstump/scripts/file-message.pl +++ b/webstump/scripts/file-message.pl @@ -7,7 +7,7 @@ # Figure out the home directory # -umask 022; +umask 007; if( !($0 =~ /\/scripts\/file-message\.pl$/) ) { die "This script can only be called with full path name!!!"; diff --git a/webstump/scripts/webstump.pl b/webstump/scripts/webstump.pl index 3da004b..ba5343e 100755 --- a/webstump/scripts/webstump.pl +++ b/webstump/scripts/webstump.pl @@ -9,6 +9,8 @@ if( !($0 =~ /\/scripts\/webstump\.pl$/) ) { die "This script can only be called with full path name!!!"; } +umask 007; + $webstump_home = $0; $webstump_home =~ s/\/scripts\/webstump\.pl$//; -- 2.30.2