Muhammad bin Sirin said: A man said to Sayyiduna Abu Hurayrah (may Allah be pleased with him): "You have given us rulings on everything, so much so that you will soon give us a ruling on excrement." Sayyiduna Abu Hurayrah (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings be upon him) say: "Whoever relieves himself on a frequented path among the paths of the Muslims, upon him is the curse of Allah, the angels and all the people."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 470