Reference: Majmoo’ Fataawa wa Rasaa.il Muhammad ibn Saalih al-‘Uthaymeen – Volume 13, Fatwa No.398
Question: What is the ruling regarding the one who prays outside the masjid, such as the one who prays in the pathways adjoining the masjid?
Response: If the masjid is not large enough for the congregation and [some of them] they prayed in the adjoining pathways [to the masjid] then there is no harm [in that] so long as they are able to follow the imaam because that is necessary.