Umar acquired some land at Khaybar and came to the Prophet ﷺ and said, "I have acquired a piece of land and have never obtained any property more precious to me than it. What do you command me to do with it?"He said, "If you wish, you may retain the land itself and give its produce in charity."So Umar gave it in charity, stipulating that the land itself would not be sold, gifted, or inherited, and that its proceeds would go to the poor, to relatives, to freeing slaves, in the cause of Allah, and to the wayfarer. Wazad, in the narration from Bishr, added, "and to guests."Then they all agreed on the wording, "There is no blame on whoever administers it to eat from it in a reasonable manner and to feed a friend, without amassing wealth from it."Wazad, in the narration from Bishr, said that Muhammad said, "without accumulating property."
حدثنا مسدد حدثنا يزيد بن زريع ح و حدثنا مسدد حدثنا بشر بن المفضل ح و حدثنا مسدد حدثنا يحيى عن ابن عون عن نافع
أصاب عمر أرضا بخيبر فأتى النبي ﷺ فقال أصبت أرضا لم أصب مالا قط أنفس عندي منه فكيف تأمرني به قال إن شئت حبست أصلها وتصدقت بها فتصدق بها عمر أنه لا يباع أصلها ولا يوهب ولا يورث للفقراء والقربى والرقاب وفي سبيل الله وابن السبيل وزاد عن بشر والضيف ثم اتفقوا لا جناح على من وليها أن يأكل منها بالمعروف ويطعم صديقا غير متمول فيه زاد عن بشر قال وقال محمد غير متأثل مالا
Bukhari narrated it in "Wills," chapter "How the endowment document should be written," Hadith 2772, from Musaddad. And Muslim narrated it in "Wills," chapter "The endowment," Hadith 1633, through the hadith of Abdullah bin Awn, with the same wording.