tsmall fixes to installation - coffin - secure lan file storage on a device HTML git clone git://parazyd.org/coffin.git DIR Log DIR Files DIR Refs DIR Submodules DIR README DIR LICENSE --- DIR commit 07c540384311cd9f4ab6badc9b454cfa71b842c8 DIR parent c4ed1f8e424d2a2aa952640be61bf13eb6171c22 HTML Author: parazyd <parazyd@dyne.org> Date: Tue, 29 Mar 2016 17:47:26 +0200 small fixes to installation Diffstat: M conf/config.sh | 20 +++++++++++--------- M src/coffinrc | 7 ++++++- M src/zlibs/hooks | 2 ++ 3 files changed, 19 insertions(+), 10 deletions(-) --- DIR diff --git a/conf/config.sh b/conf/config.sh t@@ -47,9 +47,8 @@ edit-sudo() { [[ $1 == "snowman" ]] && { pushd `pwd`/conf - # install files - install -m640 coffindav.conf /etc/apache2/sites-available/ - install -m600 davpasswd /etc/apache2/ + print "Creating coffin group..." + groupadd coffin && print "Done!" # ssl print "Generating ssl certificate..." t@@ -60,12 +59,17 @@ edit-sudo() { return 1 } - mkdir -p /etc/ssl/coffin - install -m 444 coffin.pem /etc/ssl/coffin/ + install -m 640 -d /etc/ssl/coffin + install -m 440 coffin.pem /etc/ssl/coffin/ install -m 400 coffin.key /etc/ssl/coffin/ print "Done!" # Apache + install -m 774 -g www-data -d /etc/apache2/DAV + print "DAVLockDB /etc/apache2/DAV/DAVLock" >> /etc/apache2/apache2.conf + install -m600 davpasswd /etc/apache2/DAV + install -m640 coffindav.conf /etc/apache2/sites-available/ + apachemods=(dav dav_fs dav_lock ssl) print "Enabling Apache modules..." for i in $apachemods; do t@@ -73,15 +77,13 @@ edit-sudo() { done a2ensite coffindav.conf - - print "Creating coffin group..." - groupadd coffin && print "Done!" - /etc/init.d/apache2 restart [[ -f /etc/init.d/ssh ]] && { /etc/init.d/ssh start } edit-sudo + install -m 770 -g coffin -d /home/graveyard + # TODO: add initscript print "Successfully installed and configured coffin!" DIR diff --git a/src/coffinrc b/src/coffinrc t@@ -1,10 +1,15 @@ # Configuration file for coffin. If you want to override any defaults, # please do so here, and rename the file to '.coffinrc'. # Careful! -# + # Directory where you keep all your tombs and data +# Reminder that the default is already installed, +# and the directory group owner must be 'coffin' +# with permissions 770 GRAVEYARD /home/graveyard + # Directory where your keys get mounted KEYMOUNT /media/tombkey + # Path to tomb executable TOMB /usr/local/bin/tomb DIR diff --git a/src/zlibs/hooks b/src/zlibs/hooks t@@ -74,6 +74,7 @@ create-new-tomb() { hash-key print "${keyhash}:${keypass}" >> $TOMBPASSWD + chmod 600 $TOMBPASSWD act "Wrote to ttab and tombpasswd" # Check for features t@@ -114,6 +115,7 @@ delete-tomb() { grep -v ${keyhash} $TOMBPASSWD > $TOMBPASSWD.tmp [[ $? = 0 ]] && mv $TOMBPASSWD.tmp $TOMBPASSWD && \ + chmod 600 $TOMBPASSWD && \ act "Removed from tombpasswd" # Check for features