It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that Sayyiduna Umar (may Allah be pleased with him) said: I acquired land at Khaybar. I came to the Messenger of Allah (peace and blessings be upon him) and sought his (peace and blessings be upon him) advice. I said: O Messenger of Allah (peace and blessings be upon him)! I have acquired land at Khaybar; nothing is dearer to me than it. He (peace and blessings be upon him) said: "If you wish, give its produce in charity and keep the land itself." So Sayyiduna Umar (may Allah be pleased with him) gave it in charity on the condition that it would not be sold, nor gifted, nor inherited. He gave it in charity for the poor, relatives, in the path of Allah, in freeing slaves, and for the traveller and the guest, and said: There is no harm if whoever manages it eats from it in a reasonable manner or feeds a friend of his, without amassing wealth from it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوقف / 11889