diff --git a/cleanup_samba_rights.sh b/cleanup_samba_rights.sh index e0aede1..62d8d58 100755 --- a/cleanup_samba_rights.sh +++ b/cleanup_samba_rights.sh @@ -6,8 +6,12 @@ group=$2 file_perm=${3:-664} dir_perm=${4:-2775} -chmod $dir_perm $base_dir -chgrp $group $base_dir +set_also_base_dir=${5:-false} + +if $set_also_base_dir ; then + chmod $dir_perm $base_dir + chgrp $group $base_dir +fi while IFS='' read -r -d '' filename ; do