Author: coar
Date: Fri Mar 12 16:24:45 2010
New Revision: 922313

URL: http://svn.apache.org/viewvc?rev=922313&view=rev
Log:
Moving toward maintainability

Added:
    labs/pulse/cron.d/vet-perms.root.sh
Modified:
    labs/pulse/.pulserc

Modified: labs/pulse/.pulserc
URL: 
http://svn.apache.org/viewvc/labs/pulse/.pulserc?rev=922313&r1=922312&r2=922313&view=diff
==============================================================================
--- labs/pulse/.pulserc (original)
+++ labs/pulse/.pulserc Fri Mar 12 16:24:45 2010
@@ -5,6 +5,16 @@
 PATH=$PATH:/usr/local/bin
 
 #
+# Users and groups for permissions.
+#
+PULSE_USER=pulsestat
+PULSE_GROUP=pulsestat
+HTTPD_USER=httpd
+HTTPD_GROUP=httpd
+MTA_USER=nobody
+MTA_GROUP-nobody
+
+#
 # Where the scripts and SVN checkout is located.
 #
 export PULSE_DIR='/usr/local/labs/pulse'
@@ -15,6 +25,11 @@ export PULSE_DIR='/usr/local/labs/pulse'
 export WEB_DIR='/usr/local/web/served'
 
 #
+# Where the data files should go.
+#
+DATA_DIR='/usr/local/labs/pulse/data'
+
+#
 # Set up the database envariables.
 #
 [ -e $PULSE_DIR/analysis/.dbaccess.sh ] && . $PULSE_DIR/analysis/.dbaccess.sh

Added: labs/pulse/cron.d/vet-perms.root.sh
URL: 
http://svn.apache.org/viewvc/labs/pulse/cron.d/vet-perms.root.sh?rev=922313&view=auto
==============================================================================
--- labs/pulse/cron.d/vet-perms.root.sh (added)
+++ labs/pulse/cron.d/vet-perms.root.sh Fri Mar 12 16:24:45 2010
@@ -0,0 +1,35 @@
+#! /bin/bash
+#
+# Script to be run as part of root's daily task list to make sure
+# the ownerships and permissions are all correct.
+#
+PULSE_DIR=/usr/local/labs/pulse
+RCFILE=$PULSE_DIR/.pulserc
+if [ -r $RCFILE ] ; then
+    . $RCFILE
+else
+    echo "$0: Cannot execute $RCFILE"
+    exit 1
+fi
+
+#
+# Make sure the data directory can be written to by both the mail scripts
+# and the analysis user.
+#
+chown -R $PULSE_USER.$MTA_GROUP $DATA_DIR
+chmod -R 775 $DATA_DIR
+
+#
+# Make sure the directory is accessible to the user creating the Web pages.
+#
+chown -R $HTTPD_USER.$PULSE_GROUP $WEB_DIR
+chmod -R 775 $WEB_DIR
+
+#
+# Make sure the scripts are owned and protected correctly.
+#
+chown $PULSE_USER.$PULSE_GROUP $PULSE_DIR/analysis/{*.sh,*.pl}
+chmod 6775 $PULSE_DIR/analysis/demail.sh
+
+chown -R $PULSE_USER.$PULSE_GROUP $PULSE_DIR/web-reports
+chmod 775 $PULSE_DIR/web-reports/.php



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to