diff --git a/samba.sh b/samba.sh index d460925..931b3f1 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 664 -exec chmod 664 {} \; done } @@ -242,4 +242,4 @@ elif ps -ef | egrep -v grep | grep -q smbd; then else [[ ${NMBD:-""} ]] && ionice -c 3 nmbd -D exec ionice -c 3 smbd -FS