Seems the permissions have gotten in an odd state so the owner is root but pi can read. if you run something like:
sudo chown -R pi:pi /home/pi
it will set the owner of the pi folder and all subfolder back to pi user. If you are saving to a folder not under /home/pi you’d need to specify that folder.
EDIT:
Sorry, didn’t notice that the roms dir isn’t supposed to be owned by pi so might need to do the following to revert that back
sudo chown root:pi /home/pi/RetroPie/roms
sudo chown root:pi /home/pi/RetroPie/roms/*
sudo chmod g+w /home/pi/RetroPie/roms/*
sudo chown -f -R pi:pi /home/pi/RetroPie/roms/*/*