fix: set the same mode_t after unpacking