diff options
author | Jonas Smedegaard <dr@jones.dk> | 2003-03-13 03:30:40 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2003-03-13 03:30:40 +0000 |
commit | c94d7df1955fc0da1f9a940af35717f3573e42b4 (patch) | |
tree | ec342d6c72b3692fb49fbf8ce2417b5bd5ef8cae /user-init | |
parent | da6f7b04f2ff7810860ed3a3331845b9ca919fdc (diff) |
Set owner of toplevel dirs of shares. Always run chown before chmod (just for consistency).
Diffstat (limited to 'user-init')
-rwxr-xr-x | user-init | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -185,19 +185,19 @@ for user in $USERS; do continue ;; esac - chmod a=rX "$thisdir" chown "$user": "$thisdir" + chmod a=rX "$thisdir" find "$thisdir" -mindepth 1 -maxdepth 1 -type d -print | (while read thisdir; do rogroup="`basename \"$thisdir\"`" + chown "$user":"$rogroup" "$thisdir" chmod ug=rX,o= "$thisdir" - chgrp "$rogroup" "$thisdir" find "$thisdir" -mindepth 1 -maxdepth 1 -type d -print | (while read thisdir; do rwgroup="`basename \"$thisdir\"`" - chgrp "$rwgroup" "$thisdir" + chown "$user":"$rwgroup" "$thisdir" chmod a=rX,g+s "$thisdir" find "$thisdir" -mindepth 1 -maxdepth 1 -type d -print | (while read thisdir; do sharename="`basename \"$thisdir\"`" - chgrp "$rwgroup" "$thisdir" + chown "$user":"$rwgroup" "$thisdir" chmod u=rw,go=r,a+X,g+s "$thisdir" ifs="$IFS" # Set default permissions |