summaryrefslogtreecommitdiff
path: root/user-init
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-08-08 16:20:40 +0000
committerJonas Smedegaard <dr@jones.dk>2002-08-08 16:20:40 +0000
commita8bfdb4c465dc56e363e4be62fdf1c79669d4ee7 (patch)
tree8f9137fa09cfb7c2b64f7e2e184921073287addb /user-init
parentb8e11f1b657f76ac3f4280d013b960ab5b507c7c (diff)
user-init: Support $HOME/websites/* style web hierarchy.
Diffstat (limited to 'user-init')
-rwxr-xr-xuser-init20
1 files changed, 17 insertions, 3 deletions
diff --git a/user-init b/user-init
index a839816..fd85be0 100755
--- a/user-init
+++ b/user-init
@@ -203,11 +203,25 @@ for user in $USERS; do
# chmod -R u=rw,go=r,a+X $webdir
#TODO: Only cgi scripts (.cgi and .pl) should be executable
chmod -R u+rw,go+r,a+X $dir
+ # leftover from ancient times with another policy
+ if [ $NETATALK ]; then
+ rm -rf $dir/Network\ Trash\ Folder
+ fi
+ done
+
+ # Web shares permissions
+ for dir in `find $HOME -mindepth 1 -maxdepth 1 -type d | egrep "^$HOME/websites"`; do
+ chown root: $dir
+ chmod u+rw,go+r,a+X $dir
+ done
+ for dir in `find $HOME -mindepth 2 -maxdepth 2 -type d | egrep "^$HOME/websites/"`; do
+ chown -R $user: $dir
+# chmod -R u=rw,go=r,a+X $webdir
+#TODO: Only cgi scripts (.cgi and .pl) should be executable
+ chmod -R u+rw,go+r,a+X $dir
+ # leftover from ancient times with another policy
if [ $NETATALK ]; then
rm -rf $dir/Network\ Trash\ Folder
- mkdir $dir/Network\ Trash\ Folder
- chown nobody: $dir/Network\ Trash\ Folder
- chmod a= $dir/Network\ Trash\ Folder
fi
done