Narrated Ibn Omar: In the lifetime of Allah’s Messenger, peace be upon him, Omar gave in charity some of his property; a garden of date palms called Thamgh. Omar said, ‘O Allah’s Messenger! I have some property, which I prize highly and I want to give it in charity (i.e. an endowment), with its land and trees. [It will be given] 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, Omar 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.
[4: 26- O.B. Sahih Al-Bukhari)