Surah An-Nur (النور) · verse 29 (Medinan · Juz 18 · page 353)
لَّيْسَ عَلَيْكُمْ جُنَاحٌ أَن تَدْخُلُوا۟ بُيُوتًا غَيْرَ مَسْكُونَةٍ فِيهَا مَتَٰعٌ لَّكُمْ وَٱللَّهُ يَعْلَمُ مَا تُبْدُونَ وَمَا تَكْتُمُونَ ﴿29﴾
التفسير الميسر
لكن لا حرج عليكم أن تدخلوا بغير استئذان بيوتًا ليست مخصصة لسكنى أناس بذاتهم، بل ليتمتع بها مَن يحتاج إليها كالبيوت المُعَدَّة صدقة لابن السبيل في طرق المسافرين وغيرها من المرافق، ففيها منافع وحاجة لمن يدخلها، وفي الاستئذان مشقة. والله يعلم أحوالكم الظاهرة والخفية
Sahih International
There is no blame upon you for entering houses not inhabited in which there is convenience for you. And Allah knows what you reveal and what you conceal
Marmaduke Pickthall
(It is) no sin for you to enter uninhabited houses wherein is comfort for you. Allah knoweth what ye proclaim and what ye hide
Abdullah Yusuf Ali
It is no fault on your part to enter houses not used for living in, which serve some (other) use for you: And Allah has knowledge of what ye reveal and what ye conceal