diff options
author | Jonas Smedegaard <dr@jones.dk> | 2003-03-21 01:17:03 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2003-03-21 01:17:03 +0000 |
commit | 333a4f4452ac4e977149455c449f45337c371e86 (patch) | |
tree | 3122d73def86cdb568779f123df6bbd56c778d7c /user-init | |
parent | c2d02f6b1b8fc09fe9b02ec8fbc82bd980964f36 (diff) |
Add workaround for netatalk requiring write access to .AppleDB even for read-only access.
Diffstat (limited to 'user-init')
-rwxr-xr-x | user-init | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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 |