bash: fix file perms