One solution is to stop the vm and then connect that vms disk to other healthy vm
and revert the permissions of the /var directory.
Once the permission is reverted, Attach the disk back to the original vm or create a new vm with that disk.
Also take a snapshot of the disk for safety before modifying it.