summaryrefslogtreecommitdiff
path: root/user-init
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2003-03-13 03:30:40 +0000
committerJonas Smedegaard <dr@jones.dk>2003-03-13 03:30:40 +0000
commitc94d7df1955fc0da1f9a940af35717f3573e42b4 (patch)
treeec342d6c72b3692fb49fbf8ce2417b5bd5ef8cae /user-init
parentda6f7b04f2ff7810860ed3a3331845b9ca919fdc (diff)
Set owner of toplevel dirs of shares. Always run chown before chmod (just for consistency).
Diffstat (limited to 'user-init')
-rwxr-xr-xuser-init8
1 files changed, 4 insertions, 4 deletions
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