Sorry to waste your time. Found the solution.

sudo chown -R pi:pi /opt/retropie/configs