Language:
كتاب الوصايا
55  
Wills and Testaments (Wasaayaa)
(28)
Chapter: How to write the endowment?
(28)
باب الْوَقْفِ كَيْفَ يُكْتَبُ
Sahih al-Bukhari 2772

Narrated Ibn `Umar:

When `Umar got a piece of land in Khaibar, he came to the Prophet (ﷺ) saying, "I have got a piece of land, better than which I have never got. So what do you advise me regarding it?" The Prophet (ﷺ) said, "If you wish you can keep it as an endowment to be used for charitable purposes." So, `Umar gave the land in charity (i.e. as an endowments on the condition that the land would neither be sold nor given as a present, nor bequeathed, (and its yield) would be used for the poor, the kinsmen, the emancipation of slaves, Jihad, and for guests and travelers; and its administrator could eat in a reasonable just manner, and he also could feed his friends without intending to be wealthy by its means."

حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، حَدَّثَنَا ابْنُ عَوْنٍ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما ـ قَالَ أَصَابَ عُمَرُ بِخَيْبَرَ أَرْضًا فَأَتَى النَّبِيَّ صلى الله عليه وسلم فَقَالَ أَصَبْتُ أَرْضًا لَمْ أُصِبْ مَالاً قَطُّ أَنْفَسَ مِنْهُ، فَكَيْفَ تَأْمُرُنِي بِهِ قَالَ ‏ "‏ إِنْ شِئْتَ حَبَّسْتَ أَصْلَهَا، وَتَصَدَّقْتَ بِهَا ‏"‏‏.‏ فَتَصَدَّقَ عُمَرُ أَنَّهُ لاَ يُبَاعُ أَصْلُهَا وَلاَ يُوهَبُ وَلاَ يُورَثُ، فِي الْفُقَرَاءِ وَالْقُرْبَى وَالرِّقَابِ وَفِي سَبِيلِ اللَّهِ وَالضَّيْفِ وَابْنِ السَّبِيلِ، وَلاَ جُنَاحَ عَلَى مَنْ وَلِيَهَا أَنْ يَأْكُلَ مِنْهَا بِالْمَعْرُوفِ، أَوْ يُطْعِمَ صَدِيقًا غَيْرَ مُتَمَوِّلٍ فِيهِ‏.‏
Reference : Sahih al-Bukhari 2772
In-book reference : Book 55, Hadith 35
USC-MSA web (English) reference : Vol. 4, Book 51, Hadith 33
  (deprecated numbering scheme)