COMMENTARY on 24:29
Mustafa Khattab:

Translation:
There is no blame on you if you enter public places9 where there is something of benefit for you. And Allah knows what you reveal and what you conceal.
Commentary:
9   lit., non-residential buildings.

 

A. Yusuf Ali:

Translation:
It is no fault on your part to enter houses not used for living in, which serve some (other) use for you: 2982 And Allah has knowledge of what you reveal and what you conceal.
Commentary:

2982  The rule about dwelling houses is strict, because privacy is precious, and essential to a refined, decent, and well-ordered life. Such a rule of course does not apply to houses used for other useful purposes, such as an inn or caravanserai, or a shop, or a warehouse. But even here, of course, implied permission from the owner is necessary as a matter of common-sense. The question in this passage is that of refined privacy, not that of rights of ownership.

 

Muhammad Asad:

Translation:
[On the other hand,] you will incur no sin if you [freely] enter houses not intended for living in but serving a purpose useful to you: 35 but [always remember that] God knows all that you do openly, and all that you would conceal.
Commentary:
35  Lit., "uninhabited houses wherein there are things of use (mata) for you". In the consensus of all the authorities, including the Companions of The Prophet, this relates to buildings or premises of a more or less public nature, like inns, shops, administrative Offices, public baths, etc., as well as to ancient ruins.