Narrated by Muslim1.
Ibn Umar reported: Umar acquired some land at Khaybar and went to the Prophet—peace and blessings be upon him—to seek his guidance concerning it. He said, “O Messenger of Allah, I have acquired land at Khaybar, and I have never acquired any property more precious to me than it.” He replied, “If you wish, hold its principal inalienable and give its proceeds in charity.” Ibn Umar said: Umar then established it as charity, stipulating that its principal was neither to be sold, inherited, nor given away. He dedicated it to the poor, relatives2, the emancipation of slaves, the cause of Allah, travelers, and guests. There is no blame upon its administrator for eating from it on a reasonable basis or feeding a friend, without accumulating wealth from it. Narrated by al-Bukhārī and Muslim3.
430—The best endowment is that which is most beneficial to Muslims.
431—An endowment is established by any statement indicating it.
432—Regarding the beneficiaries and conditions of an endowment, the endower’s stipulation is followed insofar as it accords with Islamic law.
433—It may not be sold unless its benefits cease. It is then sold, and the proceeds are used for an equivalent property or part of one.