MUST ONE PUT A MEZUZAH IN PLACES NOT EXCLUSIVELY FOR RESIDENCE? [Mezuzah: Chiyuv]
Gemara
Beraisa #1: A Mezuzah is required for a Beis Sha'ar (a house in front of the gate), Achsadra (an anteroom, or a room open on one side) or Mirpeses (walkway to upper story dwellings).
(Rachbah): Bei Harziki requires two Mezuzos.
(Rav Papa Sava): This is a Beis Sha'ar open to a Chatzer, and houses are open to it.
Yoma 11a (Beraisa #2): Repositories for straw or wood, a Beis ha'Bakar (a cattle pen) or storehouses are exempt from Mezuzah because women Na'osos there.
(Rav Kahana): Na'osos means that women bathe there.
(Rav Yehudah): Women perfume themselves there. Beraisa #2 exempts repositories, Beis ha'Bakar and storehouses even though women perfume themselves there.
Question (Rav Yehudah - Beraisa #3): A Refes (stall) is exempt from a Mezuzah.
According to Rav Kahana, Stam, it is obligated! (Stam, women do not bathe in a Refes, for cattle are constantly there and it is filthy from excrement.)
Counter-question (Rav Kahana - Beraisa #4): A Refes is exempt from Mezuzah; (a place) where women perfume themselves is obligated.
You (Rav Yehudah) must say that Tana'im argue about a place where women perfume themselves. I say that they argue about Stam, like the following Beraisa!
Beraisa #5: "Beisecha" - only places specifically for you (to dwell in) require Mezuzos, but not a repository for straw or wood, Beis ha'Bakar or storehouse;
Some obligate them.
A tradition from Sinai exempts a latrine, tannery, bathhouse, Mikveh or a place where women Na'osos.
Rav Kahana explains that these Tana'im argue about Beis ha'Bakar and storehouses Stam. The tradition exempts a latrine,...or a place where women bathe. Rav Yehudah explains that the first Tana exempts Beis ha'Bakar and storehouses even when women perfume themselves there. The latter Tana obligates. The tradition exempts filthy places even if women perfume themselves there.
Question (Beraisa #6): "Uvi'Sh'arecha" - a Mezuzos is required...on the opening to a Refes, coop, hayloft, or storehouse of wine or oil.
Suggestion: Perhaps we require even for a Beis Sha'ar, Achsadra or Mirpeses!
Rejection: "Beisecha" - only a Dirah (residence) is obligated.
Rav Yehudah is refuted. (He holds that all exempt Stam.)
(Beraisa #7): Gates of repositories for straw or wood, a Beis ha'Bakar or storehouse are exempt.
Rishonim
Rif and Rosh (Hilchos Mezuzah 6a and 15): "Uvi'Sh'arecha" obligates the opening to a Refes, coop, hay loft, or storehouse. "Beisecha" exempts a Beis Sha'ar, Achsadra, and Mirpeses, for these are not Dirah.
Question: Beraisa #1 obligates a Beis Sha'ar, Achsadra or Mirpeses!
Answer #1 (Rif ibid.): They are obligated when houses open to them.
Answer #2 (Tosfos 11a DH Yachol): They are exempt mid'Oraisa, but obligated mid'Rabanan.
Answer #3 (Tosfos ibid.): Beraisa #6 exempts a Beis Sha'ar of an Achsadra or Mirpeses.
Ran (Sukah 4a DH v'Ika): The Ba'al ha'Ma'or says that a Beis Sha'ar of a house is fixed, so it is obligated. In Yoma we suggested that we include a Beis Sha'ar of an Achsadra or Mirpeses. The same applies to a Beis Sha'ar of a Chatzer, since a Chatzer is not a place of Dirah. This is wrong. If it discusses a Beis Sha'ar of an Achsadra or Mirpeses, why did it say 'we exclude these, which are not specifically for Dirah'? A Beis Sha'ar is one matter. It should have said 'we exclude this...'! The Rif obligates when houses open to them. It seems that a Beis Sha'ar open to a Chatzer is like a Beis Sha'ar open to a house, and it is obligated. Bei Harziki, i.e. a Beis Sha'ar open to a Chatzer and to houses, requires two Mezuzos. This shows that a Beis Sha'ar open to a Chatzer is obligated. Tosfos answered that a Beis Sha'ar, even if it opens to a house, is obligated only mid'Rabanan, for it is not exclusively for Dirah. This is correct. The Beraisa in Yoma exempts Stam. This connotes any Beis Sha'ar! We obligate mid'Rabanan when it is open to a place that is obligated. This is like gates of cities. It seems that Rashi holds like this.
Mordechai (Hilchos Ketanos 962): The Ri asked, what is the Chidush that a Beis Sha'ar open to a house and a Chatzer requires two Mezuzos? Every gate requires a Mezuzah! He answered that the Chidush is, even though one of them is not used much, it is obligated. The commonly used one is not Mevatel the other.
Rif and Rosh (ibid.): A storehouse or Beis ha'Bakar where women bathe is exempt.
Rambam (Hilchos Mezuzah 6:7): We learn from "Beisecha" that only places specifically for you (to dwell in) require Mezuzos, but not a storehouse or Beis ha'Bakar. If women sit and perfume themselves in a Refes it is obligated, for it is designated for human residence. A Beis Sha'ar, Achsadra, Mirpeses, or garden is exempt, for they are not for Dirah.
Kesef Mishneh (DH Lefichach): The Rif and Rosh obligate a storehouse or Beis ha'Bakar Stam, like Rav Kahana's Beraisa (#2). The Rambam exempts, like Rav Yehudah. The Rambam infers that Rav Kahana was a Talmid of Rav Yehudah, since he said the Beraisa in front of him. The Rif and Rosh disagree, for we find that Rav Kahana was a great Chacham (he resolved all R. Yochanan's doubts - Bava Kama 117b).
Ma'adanei Yom Tov (90): The Rif and Rosh rule like Rav Kahana because Rav Yehudah was refuted. Even though Tana'im argue about Stam in Beraisa #5, since there is no argument in Beraisa #2, we follow Beraisa #2.
Bach (YD 286:3 DH v'Im): The Rambam must explain that even though women do not bathe in a Refes, they perfume themselves there. Tosfos (DH veha'Tanya Echad) holds that also they do not perfume themselves there. Tosfos explains Beraisa #4 to discuss other places where women perfume themselves.
R. Chananel (11a DH Tani): Rav Kahana holds that Beraisa #7 exempts when women bathe there.
Poskim
Shulchan Aruch (YD 286:1): Mezuzos are required for a Refes Bakar, coop, or storehouse.
Beis Yosef (286 DH Kosav): Semag says that Beraisa #7 argues with Beraisa #5.
Pischei Teshuvah (2): Yad ha'Ketanah (Hilchos Mezuzah 2:2) says that nowadays no one makes a Mezuzah for a Refes. This is because in those days it was somewhat clean. Nowadays we see that it is utterly filthy. Surely a chicken coop is obligated if it is four Amos (by four Amos) and has a roof and other conditions (to be obligated). It is not as filthy as a Refes. If we see that it is filthy, surely if the door is on the inside and the doorpost is outside, it is proper to put a Mezuzah there. It depends on how it appears.
Shulchan Aruch (2) Repositories for straw or wood and a Beis ha'Bakar are obligated unless women bathe there. It is disrespectful to have a Mezuzah where they are naked.
Bach (3): Rav Kahana holds that Stam, it is considered a place of Dirah. It is exempt only when women bathe there, due to disgrace. This is unlike Rav Yehudah, who holds that Stam it is exempt even though women perfume themselves there, for it is not considered Dirah. Refes Bakar is not Beis ha'Bakar. The latter is made for cattle, but they are not there constantly, and women bathe there. Cattle are constantly in Refes Bakar. It is filthy, and women do not bathe there. There is no reason to exempt it. The Tur exempts Beis ha'Bakar when women bathe there, i.e. this is common.
Teshuvas R. Akiva Eiger (1:66): We hold that mid'Oraisa, a tenant is exempt from Mezuzah. It seems that one who rents a storehouse is exempt, because the Rambam exempts, so this is a Safek mid'Rabanan. However, one should not be lenient. The Shulchan Aruch and Acharonim did not bring the Rambam's opinion. If it were considered a Safek, we would not bless! Rather, his opinion was rejected. If a Nochri is a partner, the Rema exempts; surely one may add the Rambam's opinion to remove all concern.
Pischei Teshuvah (16): We may infer from R. Akiva Eiger that where the Shulchan Aruch mentions the lenient opinion, e.g. places where women sleep, a Beis Sha'ar (when a house does not open to it), a Beis Medrash, or a house without doors, we can exempt a renter.
ruch ha'Shulchan (10): If women bathe there only occasionally this does not exempt from a Mezuzah. However, at these times one must put an opaque cover on the Mezuzah.
Shulchan Aruch (7): A Mirpeses, which is a way to alight to Aliyos, and a Beis Sha'ar or garden, is exempt. If a house is open to one of these, they are obligated. Some obligate a Beis Sha'ar even if a house is not open to it.
Beis Yosef (DH Mirpeses): The Rif and Rambam both obligate when houses open to them. We follow them. However, it is proper to be concerned for Rashi and the Ri, who obligate mid'Rabanan.
Bach (DH Mirpeses): The Tur says that the Beraisa did not need to teach that it is obligated if a house opens to it. The Ran explains that the Rif would obligate a Beis Sha'ar open to a Chatzer. It is exempt only if it opens to a garden.
Bach (DH v'Im): The Mordechai (Hilchos Ketanos, Sof 961) says that the Rif obligates a Beis Sha'ar open to a house, and exempts one open to a Chatzer. (Note: our text of the Mordechai says so in the name of the Ri.) How can he explain why Bei Harziki requires two Mezuzos? The Ri and Ran answer that a Beis Sha'ar is obligated only mid'Rabanan. The Rosh and Tur agree. This is unlike the Beis Yosef, who did not decide between the two opinions.
Taz (7): The latter opinion obligates also a Mirpeses and Achsadra (mid'Rabanan). The Shulchan Aruch mentioned only one of them. The Tur holds that this opinion obligates also a garden, for also it is not exclusively for Dirah.