Who owns the Hogwarts house-elves?
‘Well, whoever owns [Dobby] will be an old wizarding family, and they’ll be rich,’ said Fred.
‘Yeah, Mum’s always wishing we had a house-elf to do the ironing,’ said George. ‘But all we’ve got is a lousy old ghoul in the attic and gnomes all over the garden. House-elves come with big old manors and castles and places like that, you wouldn’t catch one in our house ...’
Chamber of Secrets - pages 27-28 - Bloomsbury - chapter 3, The Burrow
The way George speaks it seems as if house-elves are passed down with the property itself. Dobby seems to confirm this, but also indicates he is bound to serve one family and house forever.
‘Dobby had to punish himself, sir,’ said the elf, who had gone slightly cross-eyed. ‘Dobby almost spoke ill of his family, sir ...’
‘Your family?’
‘The wizard family Dobby serves, sir ... Dobby is a house-elf – bound to serve one house and one family for ever ...’
Chamber of Secrets - page 16 - Bloomsbury - chapter 2, Dobby's Warning
In Order of the Phoenix, Harry discovers a row of severed house-elf heads mounted on the wall along the staircase at No. Twelve Grimmauld Place -- the Black family's house-elves through the generations -- suggesting that perhaps a house-elf is born into servitude to one family and one house.
[T]hey started up the dark staircase, passing a row of shrunken heads mounted on plaques on the wall. A closer look showed Harry that the heads belonged to house-elves. All of them had the same rather snout-like nose.
Order of the Phoenix - page 60 - Bloomsbury - chapter 4, Number Twelve, Grimmauld Place
In Goblet of Fire, Hermione learns that the greatest population of house-elves live and work at Hogwarts.
‘There are house-elves here?’ [Hermione] said, staring, horror-struck, at Nearly Headless Nick. ‘Here at Hogwarts?’
‘Certainly,’ said Nearly Headless Nick, looking surprised at her reaction. ‘The largest number in any dwelling in Britain, I believe. Over a hundred.’
Goblet of Fire - page 161 - Bloomsbury - chapter 12, The Triwizard Tournament
Who owns the Hogwarts house-elves if house-elves are bound to serve one family and one house forever?
The house-elves seem bound to Hogwarts because they are completely resistant to the idea of being freed and ultimately refuse to clean Gryffindor Tower because Hermione is leaving knitted hats hidden around. They disassociate themselves with Dobby and Winky, the two free house-elves at Hogwarts. So, who owns them? Are they house-elves descended from elves originally owned by the four Hogwarts founders? Have they been relocated to Hogwarts from other placements (there is a House-elf Relocation department at the Ministry of Magic)? Is their ownership passed from headmaster to headmaster? Or do they just belong to the Hogwarts castle itself and not to any one person or family as well?
★ I'm looking for a canon-based answer (the Harry Potter novels and three supplemental books, interviews with J.K. Rowling or Pottermore) and don't prefer an answer from the HP Wikia or the Wikipedia.