Implement ff_get_ref_perms_string() and use it for tracing.