A courtyard that has many houses and many residents in upper stories, and in front of the upper stories there is a balcony that they call a "ganak," and a ladder of steps from the courtyard to the balcony is supported against the balcony, and the residents of the upper stories exit their houses to the balcony, and from there they descend via the ladder to the courtyard, and from the courtyard they exit to the public domain—their law is like two courtyards. For it has already been explained in siman 372 that a ladder has the status of an opening, and it is like two courtyards with an opening between them. And these may establish an eruv for themselves and those for themselves as they wish, and the residents of the upper story will be forbidden to move from the balcony to the courtyard vessels that rested in the house, and certainly from their house to the courtyard. And likewise, the residents of the courtyard are forbidden to move from the courtyard to the balcony vessels that rested inside the house, and certainly from a house to the balcony. Nevertheless, if the residents of the courtyard established an eruv for themselves and the residents of the balcony did not establish an eruv at all, the residents of the balcony forbid the residents of the courtyard for another reason; since their passage is through the courtyard, and they are forbidden in their own place, and we hold later in siman 378 that a foot that is forbidden in its own place forbids in a place that is not its own, see there. But when the residents of the balcony established an eruv for themselves and the residents of the courtyard did not establish an eruv, they do not care, because the residents of the courtyard do not pass through the balcony. And if the residents of the upper stories have no passage at all through the courtyard, such as when the balcony is toward the side of the public domain and the ladder stands in the public domain, they have no connection at all with one another, and they cannot establish an eruv together, since they have no opening to the courtyard. And through a window is also impossible, for the windows in the upper stories are obviously higher than ten tefachim. (And according to Rashi, even a foot that is permitted in its own place forbids in one courtyard, and so it appears from the Rambam and the Bartenura.)
חצר שיש בו הרבה בתים והרבה דיורים בעליות, ולפני העליות יש מרפסת שקורין גאנא"ק, ועל המרפסת נסמך סולם של מדרגות מהחצר אל המרפסת, ובני העליות יוצאין מביתם למרפסת, ומשם יורדין דרך הסולם אל החצר, ומהחצר יוצאין לרשות הרבים - דינם כשתי חצרות, דכבר נתבאר בסימן שע"ב, דסולם - תורת פתח עליו, והוה כשני חצרות ופתח ביניהם. ויכולים אלו לערב לעצמם ואלו לעצמם כשירצו, ויהיו בני העלייה אסורים לטלטל ממרפסת לחצר כלים ששבתו בבית, וכל שכן מביתם לחצר. וכן בני החצר - אסורים לטלטל מחצר למרפסת כלים ששבתו בתוך הבית, וכל שכן מבית למרפסת. ומכל מקום, אם עירבו בני החצר לעצמן ובני המרפסת לא עירבו כלל - אוסרים בני המרפסת על בני החצר מטעם אחר, דכיון דהילוכם הוא דרך החצר, והם אסורים במקומם, וקיימא לן לקמן בסימן שע"ח, דרגל האסורה במקומה - אוסרת שלא במקומה ע"ש. אבל בני המרפסת כשעירבו לעצמן ובני החצר לא עירבו - לא איכפת להו, מפני שאין בני החצר עוברין דרך המרפסת. ואם בני העליות אין להם הילוך כלל דרך החצר, והיינו כגון שהמרפסת הוא לצד רשות הרבים, והסולם עומד ברשות הרבים - אין להם שייכות כלל זה עם זה, ואין יכולין לערב יחד, כיון שאין להם פתח להחצר. ודרך חלון גם כן אי אפשר, שהרי החלונות בהעליות פשיטא שהם למעלה מי' טפחים. (ולרש"י גם רגל המותרת במקומה אוסרת בחצר אחד, וכן נראה מהרמב"ם והרע"ב)