From 573739677c5315cbe762bc72868356785b5f3ec4 Mon Sep 17 00:00:00 2001 From: Jaimy de Bree Date: Tue, 21 Jun 2016 19:46:12 +0200 Subject: [PATCH] Add $file to awk --- samba.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samba.sh b/samba.sh index 015f026..b37981f 100755 --- a/samba.sh +++ b/samba.sh @@ -34,7 +34,7 @@ import() { local name id file="${1}" # none) # Return: result perms() { local i file=/etc/samba/smb.conf - for i in $(awk -F ' = ' '/ path = / {print $2}'); do + 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 {} \;