File permissions now persits

This commit is contained in:
Maxime Poulin
2015-07-23 10:14:39 -04:00
parent 4bd8b63c3c
commit 649a75e459

View File

@@ -30,8 +30,9 @@ echo '========== Decrypting new/changed files: START'
while IFS= read <&99 -r unencrypted_file; do
encrypted_file=$(get_encrypted_filename "$unencrypted_file")
decrypt_file_overwrite "$encrypted_file" "$unencrypted_file"
chmod g+r "$unencrypted_file"
chmod --reference "$encrypted_file" "$unencrypted_file"
if [[ ! -z "$FILE_GROUP" ]]; then
chmod g+r "$unencrypted_file"
chgrp "$FILE_GROUP" "$unencrypted_file"
fi
done 99<"$BB_FILES"