Use set_metadata instead set_perm