In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
Umar [radiyallaahu-anhu] said that Allaah’s Messenger [sallal laahu alayhi wasallam] said: “Beware of sitting on the roads [i.e. the pavements, pathways where people pass by]! But if you must sit, then fulfil the rights of the road. They asked, ‘What are the rights of the road?’ He said, ‘Lower the gaze, respond to Salaam and give directions to the one who has lost his way”.
This hadeeth contains guidance – from the Prophet [sallal laahu alayhi wasallam] – for the entire Ummah. Firstly, they should refrain from sitting on the roads [i.e. pavements, pathways etc] because different people do walk past them. Sitting on the road has obligations – in relation to it – to be fulfilled and there are forbidden deeds which one must avoid. Secondly, it is permissible to sit, but the one doing so is required to give the roads [i.e. pathways, pavement etc] its rights – fulfilling what is commanded and avoiding what is forbidden.
Indeed the Prophet [sallal laahu alayhi wasallam] made known the rights of the road in this hadeeth, saying, “Lower your gaze”. The women and others walk past, therefore it is obligatory to divert one’s gaze away from every Haraam, and first and foremost is that one is not to look at strange women [i.e. women he has been forbidden to look at]. Reply to salaam: When a passer-by gives salaams, it is obligated on you to respond because Allaah said:[وَإِذَا حُيِّيتُم بِتَحِيَّةٍ۬ فَحَيُّواْ بِأَحۡسَنَ مِنۡہَآ أَوۡ رُدُّوهَآۗ – When you are greeted with a greeting, greet in return with what is better than it, or (at least) return it equally] [Surah An-Nisaa. Aayah 86]. Guide the one who has lost his way: Not every person knows the right way [to get to his destination]. It maybe that some people are unaware of the way to get to the place they want to go to; therefore if they ask you for advice – that you give him direction and you know where the place is, then it is obligated on you to give him directions. You should make an effort to give him directions, because Allaah continues to aid a slave [of His] as long as the slave helps his Muslim brother. [At-taleeqaatul Maleehah Alaa Silsilah Al-Ahaadeeth As-Saheehah Vol 1. Page 158. Slightly paraphrased]