(484) بَابُ إِذَا دَخَلَ بَيْتًا غَيْرَ مَسْكُونٍ
Ibn 'Abbas said, "The verse, 'Do not enter houses other thanyour own until you have asked permission and greeted their inhabitants'(24:
27) has an exception made to it when Allah says, 'There is nothingwrong in your entering houses where no one lives where there is some servicefor you. Allah knows what you divulge and what you conceal.'"
Reference: Al-Adab Al-Mufrad 1056
In-book reference: Book 43, Hadith 6
English translation: Book 43, Hadith 1056