Bava Batra, chapter 2, Mishnah 3, deals with the laws of neighbors - how a person must act toward his neighbor regarding causing damage.
"Lo yiftach adam chanut shel nachtomim veshel tzaba'im tachat otzaro shel chavero, velo refet bakar" - a person may not open a bakery or a dyers' shop beneath his neighbor's storehouse, nor a cattle barn:
A person is forbidden to open a bakery or a workshop, such as a dyehouse for dyeing fabrics, when his neighbor's storehouse - a storage room for grain, oil, and the like - is located on the floor above him. The reason for this is that these crafts produce a lot of heat and smoke, which damage the food stored on the floor above. Since the owner of the storehouse was there first, the neighbor has no right to open a business beneath him that will damage his stored food.
It is worth noting the reverse side of this law: if the owner of the ground floor had already been operating his bakery, and at that time his neighbor on the second floor was not using his floor for storage, the neighbor cannot come and demand: "I want to use my house for storage, and you must remove the bakery." He has no right to do so, because whoever is prior in time establishes the status quo.
"Velo refet bakar" - nor a cattle barn: One may not even establish a cattle barn beneath his neighbor's storehouse. Although the heat it produces is less, originating from the rotting of the manure and straw, the main issue here is the bad odor rising from it, which spoils the food on the upper floor in addition to the heat.
"Be'emet beyayin hitiru" - truthfully, regarding wine, they permitted it:
The expression "truthfully" indicates a halachah that is undisputed. Regarding wine - meaning the wine of the Land of Israel, which a little heat does not harm at all - they permitted opening the bakery or the dyehouse, since the heat does not damage it (for other wines, heat might be damaging). Nevertheless, "velo refet bakar" - nor a cattle barn: A barn may not be established, because its odor spoils even the wine of the Land of Israel.
Commercial activity in a shared courtyard:
The principle underlying the next halachah is twofold:
A person is permitted to use the shared area for his own needs, and his neighbors cannot stop him.
He is not allowed to bring in people from the outside without permission. He has the right to be in the courtyard and go about his business, but not to bring others into it who make noise and prevent the other neighbors from sleeping.
"Chanut shebechatzer - yachol limchot beyado velomar: Eini yachol lishon mikol hanichnas umikol hayotze" - regarding a shop in a courtyard, he can protest against him and say: I cannot sleep from the noise of those entering and the noise of those leaving:
Reuven wishes to set up a shop in the shared courtyard, and Shimon objects. Shimon is permitted to protest and say to Reuven: I cannot sleep due to the noise of those entering and leaving, for you are bringing customers into the courtyard to buy your merchandise. These customers have no right to be here, and they make noise and disturb my sleep. This claim is legitimate at any time of day - whether he wants to sleep at two in the afternoon or at two in the morning. Therefore, Reuven has no right to open and run a shop in the courtyard that receives outside customers.
"Oseh kelim, yotzei umocheir betoch hashuk" - he may make items, go out, and sell them in the marketplace:
On the other hand, Reuven is permitted to use the courtyard to manufacture items and goods, and it makes no difference what it involves - the pounding of a heavy hammer for metalworking or operating a millstone to grind wheat. Even though the work is noisy, he is allowed to do it, since it is his courtyard and he is using it in its normal manner. He just has to take the goods he produced as a blacksmith or miller, go out with them to the marketplace, and sell them there.
Therefore "eino yachol limchot beyado velomar lo: Eini yachol lishan" - he cannot protest against him and say to him, "I cannot sleep":
"Lo mikol hapatish" - not from the noise of the hammer. Shimon cannot claim that the noise of the hammer pounding prevents him from sleeping. This is not an acceptable claim.
"Velo mikol harechayim" - and not from the noise of the millstones. Not even from the noise of the grinding millstones, even though it is a loud noise. Reuven has the right to grind in his courtyard, and Shimon has to live with it.
"Velo mikol hatinokot" - and not from the noise of the children. Not even from the noise of the schoolchildren.
The law regarding the noise of children is slightly different. After all, we said that a person is not allowed to bring people from the outside into the courtyard, and here we are establishing that Shimon cannot protest that the students, who come to learn in the Talmud Torah that Reuven runs in his courtyard, are making noise during recess. According to the strict letter of the law, since the children come from the outside, they have no right to be in the courtyard; rather, there is a special rabbinic enactment here, due to "lehagdil Torah uleha'adirah" (to magnify and glorify Torah) - for the sake of studying Torah and glorifying it, teachers are needed and students are needed. And if a teacher wants to run a school out of his courtyard, even if the students make noise, that is the problem of the other neighbors.
And from here also comes the limit of the halachah: all this is because we are talking about children studying Torah subjects. But if the school is intended to teach people a profession - to become accountants or carpenters - that is too bad; in such a case they have no right to be there, and the members of the courtyard can protest. Against a Talmud Torah - they cannot protest.
In conclusion: We learned in this lesson the laws of neighborly damages: the prohibition against opening a bakery, dyehouse, or cowshed under a friend's storehouse due to the heat, smoke, and smell, and the rule that whoever was there first determines the matter; the special permission regarding wine of the Land of Israel, which heat does not damage, and the prohibition that remains on a cowshed due to the smell; and the laws of using a shared courtyard - a person's right to engage in his work in the courtyard even with noise, alongside the prohibition against bringing people into it from the outside, and the rabbinic enactment that permits the noise of schoolchildren due to "lehagdil Torah uleha'adirah" (to magnify and glorify Torah).