I acquired a piece of land in Khaybar, so I came to the Messenger of Allah ﷺ and said, "I have acquired a piece of land more precious to me than any wealth I have ever owned. What do you advise me to do with it?"He replied, "If you wish, give it as charity."So he gave it as a charitable endowment, on the condition that it would not be sold or given away as a gift, with its proceeds going to the poor, near relatives, the freeing of slaves, guests, and travelers. There is no blame on the one who administers it if he eats from it in a reasonable manner without accumulating wealth from it, and feeds others.
أخبرنا إسحق بن إبراهيم قال أنبأنا أبو داود الحفري عمر بن سعد عن سفيان الثوري عن ابن عون عن نافع عن ابن عمر
أصبت أرضا من أرض خيبر فأتيت رسول الله ﷺ فقلت أصبت أرضا لم أصب مالا أحب إلي ولا أنفس عندي منها قال إن شئت تصدقت بها فتصدق بها على أن لا تباع ولا توهب في الفقراء وذي القربى والرقاب والضيف وابن السبيل لا جناح على من وليها أن يأكل بالمعروف غير متمول مالا ويطعم
Muslim narrated it in the chapter on bequests, section on endowment, hadith no. 1633, from Ishaq bin Ibrahim through the same chain, and it is also in Kubra, hadith no. 6424.