From c94d7df1955fc0da1f9a940af35717f3573e42b4 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 13 Mar 2003 03:30:40 +0000 Subject: Set owner of toplevel dirs of shares. Always run chown before chmod (just for consistency). --- user-init | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'user-init') diff --git a/user-init b/user-init index c236167..16bff2d 100755 --- a/user-init +++ b/user-init @@ -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 -- cgit v1.2.3