set permissions on key file