samba.sh - fix #110 only change perms where needed

This commit is contained in:
David Personette 2018-01-15 20:25:12 -05:00
parent e059b4f0fb
commit f3ba3cf25f

View File

@ -63,8 +63,8 @@ import() { local name id file="$1"
perms() { local i file=/etc/samba/smb.conf perms() { local i file=/etc/samba/smb.conf
for i in $(awk -F ' = ' '/ path = / {print $2}' $file); do for i in $(awk -F ' = ' '/ path = / {print $2}' $file); do
chown -Rh smbuser. $i chown -Rh smbuser. $i
find $i -type d -exec chmod 775 {} \; find $i -type d ! -perm 775 -exec chmod 775 {} \;
find $i -type f -exec chmod 664 {} \; find $i -type f ! -perm 0664 -exec chmod 0664 {} \;
done done
} }