In the lifetime of Messenger of Allah ﷺ , ʿUmar gave in charity some of his property, a garden of date-palms called Thamgh. ʿUmar said, "O Messenger of Allah ﷺ! I have some property which I prize highly and I want to give it in charity." The Prophet; said, "Give it in charity (i.e. as an endowment) with its land and trees on the condition that the land and trees will neither be sold nor given as a present, nor bequeathed, but the fruits are to be spent in charity." So ʿUmar gave it in charity, and it was for Allah's Cause, the emancipation of slaves, for the poor, for guests, for travelers, and for kinsmen. The person acting as its administrator could eat from it reasonably and fairly, and could let a friend of his eat from it provided he had no intention of becoming wealthy by its means. (Using translation from Bukhārī 2764)
أَنَّ عُمَرَ ؓ تَصَدَّقَ بِمَالٍ لَهُ عَلَى عَهْدِ رَسُولِ اللهِ ﷺ وَكَانَ يُقَالُ لَهُ ثَمْغٌ وَكَانَ نَخْلًا فَقَالَ عُمَرُ ؓ يَا رَسُولَ اللهِ إِنِّي اسْتَفَدْتُ مَالًا وَهُوَ عِنْدِي نَفِيسٌ فَأَرَدْتُ أَنْ أَتَصَدَّقَ بِهِ فَقَالَ النَّبِيُّ ﷺ تَصَدَّقْ بِأَصْلِهِ لَا يُبَاعُ وَلَا يُوهَبُ وَلَا يُورَثُ وَلَكِنْ يُنْفَقُ ثَمَرُهُ فَتَصَدَّقَ بِهِ عُمَرُ فَصَدَقَتُهُ ذَلِكَ فِي سَبِيلِ اللهِ وَفِي الرِّقَابِ وَالْمَسَاكِينِ وَالضَّيْفِ وَابْنِ السَّبِيلِ وَلِذِي الْقُرْبَى وَلَا جُنَاحَ عَلَى مَنْ وَلِيَه أَنْ يَأْكُلَ مِنْهُ بِالْمَعْرُوفِ أَوْ يُؤْكِلَ صَدِيقَهُ غَيْرَ مُتَمَوِّلٍ بِهِ