The Messenger of Allah ﷺ said, "Beware of sitting in the roadways."The companions replied, "Messenger of Allah, we have no choice but to sit in our gatherings to converse there."The Messenger of Allah ﷺ said, "If you must, then give the road its due right."They asked, "What is the right of the road, Messenger of Allah?"He answered, "Lowering the gaze, refraining from causing harm, returning the greeting of peace, enjoining what is right, and forbidding what is wrong."
حدثنا عبد الله بن مسلمة حدثنا عبد العزيز يعني ابن محمد عن زيد يعني ابن أسلم عن عطاء بن يسار
أن رسول الله ﷺ قال إياكم والجلوس بالطرقات قالوا يا رسول الله ما بد لنا من مجالسنا نتحدث فيها فقال رسول الله ﷺ إن أبيتم فأعطوا الطريق حقه قالوا وما حق الطريق يا رسول الله قال غض البصر وكف الأذى ورد السلام والأمر بالمعروف والنهي عن المنكر
Narrated by Muslim, Book of Clothing and Adornment, Chapter on the prohibition of sitting in the roads and giving the road its due, hadith no. 2121, from the hadith of Abdul-Aziz Darawardi, and Bukhari, Book of Injustices, Chapter on the courtyards of houses and sitting in them, etc., hadith no. 2465, from the hadith of Zayd bin Aslam, with the same wording.