summaryrefslogtreecommitdiff
path: root/user-init
diff options
context:
space:
mode:
Diffstat (limited to 'user-init')
-rwxr-xr-xuser-init14
1 files changed, 11 insertions, 3 deletions
diff --git a/user-init b/user-init
index 118b26d..16186af 100755
--- a/user-init
+++ b/user-init
@@ -173,7 +173,8 @@ for user in $USERS; do
# Define dir and file exceptions
case "$sharetype" in
mac)
- dirs_group_rw_create='.AppleDB/.AppleDesktop/Temporary Items/TheFindByContentFolder'
+ dirs_world_rw_create='.AppleDB'
+ dirs_group_rw_create='.AppleDesktop/Temporary Items/TheFindByContentFolder'
dirs_group_ro_create='TheVolumeSettingsFolder'
dirs_group_ro_update='.AppleDouble'
files_group_ro_update=':2eDS_Store'
@@ -185,8 +186,8 @@ for user in $USERS; do
continue
;;
esac
- exceptions="$dirs_group_rw_create/$dirs_group_ro_create/$dirs_group_ro_update/$files_group_ro_update/$dirs_no_access_purge"
- exception_dirs_create="$dirs_group_rw_create/$dirs_group_ro_create"
+ exceptions="$dirs_world_rw_create/$dirs_group_rw_create/$dirs_group_ro_create/$dirs_group_ro_update/$files_group_ro_update/$dirs_no_access_purge"
+ exception_dirs_create="$dirs_world_rw_create/$dirs_group_rw_create/$dirs_group_ro_create"
chown "$user": "$thisdir"
chmod a=rX "$thisdir"
find "$thisdir" -mindepth 1 -maxdepth 1 -type d -print | (while read thisdir; do
@@ -223,6 +224,13 @@ for user in $USERS; do
fi
chown "$user":"$rwgroup" "$thisdir/$dir"
done
+ IFS="/"; for dir in $dirs_world_rw_create; do IFS="$ifs";
+ if [ "$rogroup" = "$rwgroup" ]; then
+ chmod -R ug=rw,o=r,a+X,g+s "$thisdir/$dir"
+ else
+ chmod -R a=rw,a+X,g+s "$thisdir/$dir"
+ fi
+ done
IFS="/"; for dir in $dirs_group_rw_create; do IFS="$ifs";
chmod -R ug=rw,o=r,a+X,g+s "$thisdir/$dir"
done