#!/bin/bash owner="`id -nu`" cat <$i/.htaccess done cat <> ./ca/.htaccess AuthName "Restricted Area" AuthType Basic AuthUserFile "$passwd_file" require valid-user SSLRequireSSL EOS cat < ./admin/.htaccess AuthName "Restricted Area" AuthType Basic AuthUserFile "$passwd_file" require valid-user SSLRequireSSL Order Allow,Deny Allow from $subnet EOS # Start with web server getting read-only access to everything. # Directories have sticky bits set. find . -exec chown $owner:$group {} \; find . ! -type d -exec chmod 640 {} \; find . -type d -exec chmod 3750 {} \; echo "Done."