Siman 378
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א שָׁלֹשׁ חֲצֵרוֹת פְּתוּחוֹת זוֹ לְזוֹ וּפְתוּחוֹת לִרְשׁוּת הָרַבִּים, וְעֵרְבָה כָּל אַחַת מֵהַחִיצוֹנוֹת עִם הָאֶמְצָעִית, וְהַחִיצוֹנוֹת לֹא עֵרְבוּ יַחַד, הַחִיצוֹנוֹת אֲסוּרוֹת זוֹ עִם זוֹ וְהָאֶמְצָעִית מֻתֶּרֶת עִם כָּל אַחַת מֵהֶן וְהֵן מֻתָּרוֹת עִמָּהּ. בַּמֶּה דְּבָרִים אֲמוּרִים, כְּשֶׁנָּתְנָה אֶמְצָעִית עֵרוּבָהּ בְּזוֹ וְעֵרוּבָהּ בְּזוֹ, אוֹ שֶׁנָּתְנוּ הַחִיצוֹנוֹת עֵרוּבָן בָּאֶמְצָעִית בִּשְׁנֵי בָּתִּים, אֲבָל אִם נָתְנוּ שְׁתֵּי הַחִיצוֹנוֹת עֵרוּבָן בָּאֶמְצָעִית בְּבַיִת אֶחָד, שְׁלָשְׁתָּן מֻתָּרוֹת זוֹ עִם זוֹ.
1 Laws of courtyards that open into one another. Contains 5 sections Three courtyards opening into one another and opening to a public domain, where each of the outer ones made an eruv with the middle one but the outer ones did not make an eruv with each other — the outer ones are forbidden to each other, the middle one is permitted with each of them, and they are permitted with it. This applies when the middle one placed its eruv in one and its eruv in the other, or when the outer ones placed their eruv in the middle one in two separate houses. But if both outer ones placed their eruv in the middle one in one house, all three are permitted with one another.
ב שְׁתֵּי חֲצֵרוֹת זוֹ לְפָנִים מִזּוֹ, וּפְנִימִית פְּתוּחָה לַחִיצוֹנָה וְהַחִיצוֹנָה לַמָּבוֹי, וְיֵשׁ לַפְּנִימִית דְּרִיסַת רֶגֶל עַל הַחִיצוֹנָה, אִם עֵרְבָה פְּנִימִית לְעַצְמָהּ וְלֹא הַחִיצוֹנָה, אוֹ שֶׁעֵרְבָה כָּל אַחַת לְעַצְמָהּ וְשָׁכַח אֶחָד מִן הַחִיצוֹנָה וְלֹא עֵרֵב, פְּנִימִית מֻתֶּרֶת וְהַחִיצוֹנָה אֲסוּרָה. עֵרְבָה חִיצוֹנָה וְלֹא פְּנִימִית, אוֹ שֶׁעֵרְבָה כָּל אַחַת לְעַצְמָהּ וְשָׁכַח אֶחָד מֵהַפְּנִימִית וְלֹא עֵרֵב, שְׁתֵּיהֶן אֲסוּרוֹת. עֵרְבָה כָּל אַחַת לְעַצְמָהּ, כָּל אַחַת מֻתֶּרֶת בַּחֲצֵרָהּ.
2 Two courtyards one inside the other, the inner one opening to the outer one and the outer one to an alleyway, and the inner one has foot traffic through the outer one — if the inner one made an eruv on its own and the outer one did not, or if each made its own eruv and one person from the outer one forgot and did not make an eruv — the inner one is permitted and the outer one is forbidden. If the outer one made an eruv and the inner one did not, or if each made its own eruv and one person from the inner one forgot and did not make an eruv — both are forbidden. If each made its own eruv, each is permitted in its own courtyard.
ג עֵרְבוּ בְּיַחַד וְנָתְנוּ עֵרוּבָן בַּחִיצוֹנָה, וְשָׁכַח אֶחָד בֵּין מִן הַפְּנִימִית בֵּין מִן הַחִיצוֹנָה וְלֹא עֵרֵב, שְׁתֵּיהֶן אֲסוּרוֹת עַד שֶׁיְּבַטֵּל רְשׁוּתוֹ. וְאִם נָתְנוּ עֵרוּבָן בַּפְּנִימִית וְשָׁכַח אֶחָד מִן הַפְּנִימִית וְלֹא עֵרֵב, שְׁתֵּיהֶן אֲסוּרוֹת. אֲבָל אִם שָׁכַח אֶחָד מִן הַחִיצוֹנָה וְלֹא עֵרֵב, פְּנִימִית מֻתֶּרֶת.
3 If they made a joint eruv and placed it in the outer one, and one person — whether from the inner or outer — forgot and did not make an eruv, both are forbidden until he renounces his domain. If they placed their eruv in the inner one and one person from the inner one forgot and did not make an eruv, both are forbidden. But if one person from the outer one forgot and did not make an eruv, the inner one is permitted.
ד אִם יָחִיד דָּר בַּפְּנִימִית וְיָחִיד בַּחִיצוֹנָה, אוֹ שְׁנַיִם בַּחִיצוֹנָה, וְעֵרְבוּ, אֵין הַיָּחִיד שֶׁבַּפְּנִימִית אוֹסֵר עַל הַחִיצוֹנָה. הַגָּה: וְהוּא הַדִּין רַבִּים שֶׁהֵם כְּיָחִיד וְאֵינָן צְרִיכִין לְעָרֵב, כְּדֶרֶךְ שֶׁנִּתְבָּאֵר לְעֵיל סִימָן ש"ע. (הַמַּגִּיד פ"ד).
4 If one individual lives in the inner one and one individual in the outer one, or two in the outer one who made an eruv — the individual in the inner one does not restrict the outer one. Rema: The same applies to many who are like an individual and need not make an eruv, as explained above in Siman 370.
ה שְׁלֹשָׁה חֲצֵרוֹת זוֹ לְפָנִים מִזּוֹ וְיָחִיד בְּכָל אַחַת, אַף עַל פִּי שֶׁרַבִּים דּוֹרְסִים בַּחִיצוֹנָה, אֵינָם אוֹסְרִים שֶׁכָּל אַחַת מֻתֶּרֶת בִּמְקוֹמָהּ. וְאִם הָיוּ שְׁנַיִם בַּפְּנִימִית וְלֹא עֵרְבוּ, הֲרֵי הֵם אוֹסְרִים עַל הַיְחִידִים שֶׁבָּאֶמְצָעִית וְשֶׁבַּחִיצוֹנָה. זֶה הַכְּלָל: רֶגֶל הָאֲסוּרָה בִּמְקוֹמָהּ, אוֹסֶרֶת שֶׁלֹּא בִּמְקוֹמָהּ; וְרֶגֶל הַמֻּתֶּרֶת, אֵינָהּ אוֹסֶרֶת שֶׁלֹּא בִּמְקוֹמָהּ.
5 Three courtyards one inside the other with one individual in each — even though many have foot traffic through the outer one, they do not restrict, since each one is permitted in its own place. But if there were two in the inner one who did not make an eruv, they restrict the individuals in the middle and outer ones. This is the general rule: a foot that is forbidden in its own place restricts in other places, but a foot that is permitted in its own place does not restrict in other places.