summaryrefslogtreecommitdiff
path: root/user-init
diff options
context:
space:
mode:
Diffstat (limited to 'user-init')
-rwxr-xr-xuser-init24
1 files changed, 20 insertions, 4 deletions
diff --git a/user-init b/user-init
index 45cb9de..fb8f55a 100755
--- a/user-init
+++ b/user-init
@@ -212,7 +212,7 @@ for user in $USERS; do
# 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
+ chmod a=r,u+w,a+X $dir
done
for dir in `find $HOME -mindepth 2 -maxdepth 2 -type d | egrep "^$HOME/websites/"`; do
chown -R $user: $dir
@@ -226,7 +226,7 @@ for user in $USERS; do
done
for dir in `find $HOME -mindepth 1 -maxdepth 1 -type d | egrep "^$HOME/webscripts"`; do
chown root: $dir
- chmod u+rw,go+r,a+X $dir
+ chmod a=r,u+w,a+X $dir
done
for dir in `find $HOME -mindepth 2 -maxdepth 2 -type d | egrep "^$HOME/webscripts/"`; do
chown -R $user: $dir
@@ -236,11 +236,27 @@ for user in $USERS; do
done
for dir in `find $HOME -mindepth 1 -maxdepth 1 -type d | egrep "^$HOME/webdata"`; do
chown root: $dir
- chmod u+rw,go+r,a+X $dir
+ chmod a=r,u+w,a+X $dir
done
for dir in `find $HOME -mindepth 2 -maxdepth 2 -type d | egrep "^$HOME/webdata/"`; do
chown -R $user: $dir
- chmod -R u=rw,go=r,a+X $dir
+ chmod -R u=rw,go=,u+X $dir
+ done
+ for dir in `find $HOME -mindepth 1 -maxdepth 1 -type d | egrep "^$HOME/webphpsites"`; do
+ chown root: $dir
+ chmod a=r,u+w,a+X $dir
+ done
+ for dir in `find $HOME -mindepth 2 -maxdepth 2 -type d | egrep "^$HOME/webphpsites/"`; do
+ chown -R $user:www-data $dir
+ chmod -R ug=rw,o=r,a+X $dir
+ done
+ for dir in `find $HOME -mindepth 1 -maxdepth 1 -type d | egrep "^$HOME/webphpdata"`; do
+ chown root: $dir
+ chmod a=r,u+w,a+X $dir
+ done
+ for dir in `find $HOME -mindepth 2 -maxdepth 2 -type d | egrep "^$HOME/webphpdata/"`; do
+ chown -R $user:www-data $dir
+ chmod -R ug=rw,o=,ug+X $dir
done
# Dummy user restrictions