coffin

secure lan file storage on a device
git clone git://parazyd.org/coffin.git
Log | Files | Refs | Submodules | README | LICENSE

commit 07c540384311cd9f4ab6badc9b454cfa71b842c8
parent c4ed1f8e424d2a2aa952640be61bf13eb6171c22
Author: parazyd <parazyd@dyne.org>
Date:   Tue, 29 Mar 2016 17:47:26 +0200

small fixes to installation

Diffstat:
Mconf/config.sh | 20+++++++++++---------
Msrc/coffinrc | 7++++++-
Msrc/zlibs/hooks | 2++
3 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/conf/config.sh b/conf/config.sh @@ -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..." @@ -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 @@ -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!" diff --git a/src/coffinrc b/src/coffinrc @@ -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 diff --git a/src/zlibs/hooks b/src/zlibs/hooks @@ -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 @@ -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