modified to support permission to key password files