It was narrated that Ibn 'Umar said:
"Umar bin Khattab acquired some land at Khaibar, and he came to the Prophet (ﷺ) and consulted him. He said: 'O Messenger of Allah(ﷺ), I have been given some wealth at Khaibar and I have never been given any wealth that is more precious to me than it. What do you command me to do with it? He said: 'If you wish, you can make it an endowment and give (its produce) in charity.' So 'Umar gave it on the basis that it would not be sold, given away or inherited, and (its produce) was to be given to the poor, to relatives, for freeing slaves, in the cause of Allah, to way fares and to guests; and there was nothing wrong if a person appointed to be in charge of it consumed from it on a reasonable basis or feeding a fried, without accumulating it for himself."
English reference: Vol. 3, Book 15, Hadith 2396
Arabic reference: Book 15, Hadith 2486