From f3ba3cf25fd70e191e01e7455508c202069c5d81 Mon Sep 17 00:00:00 2001 From: David Personette Date: Mon, 15 Jan 2018 20:25:12 -0500 Subject: [PATCH] samba.sh - fix #110 only change perms where needed --- samba.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samba.sh b/samba.sh index d460925..9d8d103 100755 --- a/samba.sh +++ b/samba.sh @@ -63,8 +63,8 @@ import() { local name id file="$1" perms() { local i file=/etc/samba/smb.conf for i in $(awk -F ' = ' '/ path = / {print $2}' $file); do chown -Rh smbuser. $i - find $i -type d -exec chmod 775 {} \; - find $i -type f -exec chmod 664 {} \; + find $i -type d ! -perm 775 -exec chmod 775 {} \; + find $i -type f ! -perm 0664 -exec chmod 0664 {} \; done }