صحيح البخاري Sahih Bukhari كتاب الوصايا The Book of Wasaya (Wills and Testaments)
بَابُ إِذَا أَوْقَفَ جَمَاعَةٌ أَرْضًا مُشَاعًا فَهْوَ جَائِزٌ:

(27) Chapter. If a group of person give a jointly-owned piece of land as an endowment, the foundation of the endowment is valid.

1 hadith
Hadith 2771
حَدَّثَنَا مُسَدَّدٌ ، حَدَّثَنَا عَبْدُ الْوَارِثِ ، عَنْ أَبِي التَّيَّاحِ ، عَنْ أَنَسٍ رَضِيَ اللَّهُ عَنْهُ ، قَالَ : " أَمَرَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ بِبِنَاءِ الْمَسْجِدِ ، فَقَالَ : يَا بَنِي النَّجَّارِ ثَامِنُونِي بِحَائِطِكُمْ هَذَا ، قَالُوا : لَا ، وَاللَّهِ لَا نَطْلُبُ ثَمَنَهُ إِلَّا إِلَى اللَّهِ " .
Narrated Anas: When the Prophet ordered that the mosque be built, he said, "O Bani An-Najjar! Suggest to me a price for this garden of yours." They replied, "By Allah! We will demand its price from none but Allah."
Hadith Reference Sahih Bukhari / The Book of Wasaya (Wills and Testaments) / Hadith: 2771
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة