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