Who owns the Gaza Strip and West Bank?

Gaza is in the control of Hamas (a Palestinian group), West Bank is still in the hands of Fatah (another Palestinian group) but Israel is the occupying force in the vast majority of the West Bank.