Magento would wreck Ganondorf's physical forms like a little *****. But I'm not sure about his ephemeral giant head form. Not sure if he could hurt it.
Magneto has managed to damage/destroy the energy form of Proteus, a reality warper from marvel. No idea how Ganondorf works, but not having a solid form shouldn't in itself present a problem.
However, Ganondorf can turn intangible, teleport, and open portals to other dimensions. The problem is not getting Ganondorf into space so much as it is keeping him there. Similar situation with killing him. While I don't believe Magneto will have any problem wrecking Ganondorf, he might have trouble keeping him down. Still, I'm not sure there's a lot that Ganondorf can do in return, either...
Gender: Male Location: 1/9.7'rd Horseman of the Apocalypse
That could let him bypass Ganon's ability to become intangible, but any damage he does still wouldn't matter to Ganondorf who doesn't actually need a body at all.
__________________
The moon and stars aren't just shades of lead
But you wouldn't know as you rest your head.
Gender: Male Location: 1/9.7'rd Horseman of the Apocalypse
Nope, might prevent the use of fisticuffs but eh. Wouldn't bet on that being the method for a win anyway. Ganon's immortal, and Magneto's durable. Ganon would likely need to resort to his more broken abilities to beat Magneto. (Twilight fields, interdimensional BFRs, reality warping) I'm just here to point out that it doesn't look like Magneto can put him down.
__________________
The moon and stars aren't just shades of lead
But you wouldn't know as you rest your head.
Neither did Proteus, that didn't stop Magneto from harming/destroying him. But again I'm not familiar with Ganondorf powers, so I'll get the scans for you guys that actually know about Ganondorf to analyse what would happen.