Al-Adab Al-Mufrad 1056
Grading supplied with this record: Sahih (Al-Albani)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا إِسْحَاقُ، قَالَ: حَدَّثَنَا عَلِيُّ بْنُ الْحُسَيْنِ قَالَ: حَدَّثَنِي أَبِي، عَنْ يَزِيدَ النَّحْوِيِّ، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ قَالَ: {لاَ تَدْخُلُوا بُيُوتًا غَيْرَ بُيُوتِكُمْ حَتَّى تَسْتَأْنِسُوا وَتُسَلِّمُوا عَلَى أَهْلِهَا}، وَاسْتَثْنَى مِنْ ذَلِكَ، فَقَالَ: {لَيْسَ عَلَيْكُمْ جُنَاحٌ أَنْ تَدْخُلُوا بُيُوتًا غَيْرَ مَسْكُونَةٍ فِيهَا مَتَاعٌ لَكُمْ وَاللهُ يَعْلَمُ مَا تُبْدُونَ وَمَا تَكْتُمُونَ}.
Ibn 'Abbas said,
"The verse, 'Do not enter houses other than your own until you have asked permission and greeted their inhabitants' (24:27) has an exception made to it when Allah says, 'There is nothing wrong in your entering houses where no one lives where there is some service for you. Allah knows what you divulge and what you conceal.'"
Full reference and source
Al-Adab Al-Mufrad 1056 In-book : Book 43, Hadith 6 English translation : Book 43, Hadith 1056
View source on Sunnah.com (opens in a new tab)