1 #!/bin/sh 2 3 WIKI=$1 4 USER=$2 5 6 if [ ! "$WIKI" ]; then 7 echo "Please specify a Wiki directory." 1>&2 8 exit 1 9 fi 10 11 if [ ! "$USER" ]; then 12 echo "Please specify a Web username." 1>&2 13 exit 1 14 fi 15 16 # Initialise and configure ACLs on the gpg "homedir". 17 18 if [ ! -e "$WIKI/gnupg" ]; then 19 mkdir "$WIKI/gnupg" 20 fi 21 22 chmod go-rwx "$WIKI/gnupg" 23 setfacl -m u:$USER:rwx "$WIKI/gnupg" 24 setfacl -m m:rwx "$WIKI/gnupg" 25 setfacl -m d:u:$USER:rwx "$WIKI/gnupg" 26 setfacl -m d:m:rwx "$WIKI/gnupg" 27 setfacl -m m:rw "$WIKI/gnupg/"*