Abdullah bin Umar reported,

Umar bin Khattab acquired a piece of land at Khaybar. He came to the Prophet ﷺ to seek his advice about it and said, "Messenger of Allah, I have acquired a piece of land at Khaybar. I have never obtained any property more valuable to me than this. What do you command me to do with it?"The Prophet ﷺ replied, "If you wish, you may keep the land itself and give its produce in charity."So Umar gave it in charity on the condition that the land itself would not be sold, gifted, or inherited. He gave its produce in charity to the poor, to relatives, for freeing slaves, in the cause of Allah, to travelers, and to guests. There is no blame on whoever administers it if he eats from it in a reasonable manner or feeds a friend, without seeking to accumulate wealth from it.

Ibn Majah 2396

Sahih

حدثنا نصر بن علي الجهضمي حدثنا معتمر بن سليمان عن ابن عون عن نافع

عن ابن عمر قال

أصاب عمر بن الخطاب أرضا بخيبر فأتى النبي ﷺ فاستأمره فقال يا رسول الله إني أصبت مالا بخيبر لم أصب مالا قط هو أنفس عندي منه فما تأمرني به فقال إن شئت حبست أصلها وتصدقت بها قال فعمل بها عمر على أن لا يباع أصلها ولا يوهب ولا يورث تصدق بها للفقراء وفي القربى وفي الرقاب وفي سبيل الله وابن السبيل والضيف لا جناح على من وليها أن يأكلها بالمعروف أو يطعم صديقا غير متمول

ابن ماجه 2396صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Charity
Chapter
Whoever stops
Numbering
Darussalam 2396
Ibn Majah 2396