The Rambam, of blessed memory, wrote in chapter 6 of Chovel: If one filled the courtyard of his fellow with jugs of wine and oil, even if he brought them in with permission, since the owner of the courtyard did not take upon himself to guard them, he may enter and exit in his usual manner, and whatever is broken of the jugs during his entry and exit, he is exempt for them; but if he broke them intentionally, even if the owner of the jugs brought them in without permission, he is liable. Thus far his words. And he follows his reasoning which we explained in siman 378, that in the domain of the damager, as long as he does not intend to damage, he is exempt. But according to the reasoning of Rashi explained there, he is liable unless he did not give him permission to fill the entire courtyard. And so ruled the Ra'avad and the Tur. And there is one who says that even without permission, if he only knew, he is liable even when not intending to damage, as written there in section 16. But it does not appear so from the wording of the Tur, and also in the Gemara [28a] it is implied explicitly that even if he knew, since he did not give him permission, he may walk in his courtyard even though through the path of his walking the jugs of the one who brought them into the courtyard were broken, for the owner of the courtyard does not have to trouble himself and arrange the jugs of this person [Tosafot]. And it is not similar to there, for here, since he filled the entire courtyard and the owner of the courtyard is forced to walk through there, they were broken automatically; and also he does not have to trouble himself and go to beit din, for we established that a person may take the law into his own hands, as written in siman 4, see there. And also regarding the opinion of the Rambam, of blessed memory, it appears to me that his intention is not that he gave him permission to fill the entire courtyard, for if so, there is no logic at all that he should walk over them and break them in the path of his walking, for we are witnesses that with such permission the owner of the jugs would not have consented to this; rather, his intention is that he gave him permission to bring his jugs into his courtyard, but he did not give him permission to fill it until no path remained for him. Nevertheless, if he took upon himself to guard, even though regarding this matter of filling the entire courtyard he did not give him explicit permission, nevertheless the owner of the courtyard may not cause him damage by his walking since he accepted to guard them. And according to this, our teachers do not disagree on the law at all.
כתב הרמב"ם ז"ל בפ"ו מחובל הרי שמילא חצר חבירו כדי יין ושמן אפילו הכניס ברשות הואיל ולא קבל עליו בעל החצר לשמור ה"ז נכנס ויוצא כדרכו וכל שישתבר מהכדים בכניסתו וביציאתו הרי הוא פטור עליהם ואם שברם בכוונה אפילו הכניסם בעל הכדים שלא ברשות ה"ז חייב עכ"ל והולך לשיטתו שבארנו בסי' שע"ח דברשות המזיק כל שאינו מתכוין להזיק פטור אבל לשיטת רש"י שנתבאר שם חייב אם לא שלא נתן לו רשות למלאות כל החצר וכן פסק הראב"ד והטור ויש מי שאומר שאפילו בלא רשות אם רק ידע חייב אף באינו מתכוין להזיק כמ"ש שם סעיף ט"ז ולא משמע כן מלשון הטור וגם בגמ' [כח.] משמע להדיא דאף בידע כיון שלא נתן לו רשות יכול לילך בחצרו אע"פ שדרך הלוכו נשברו כדיו של המכניסם להחצר דאין לו לבעל החצר לטרוח ולסדר כדים שלזה [תוס'] ולא דמי לשם דבכאן כיון שמילא כל החצר והרי בעל החצר מוכרח לילך דרך שם וממילא נשברו וגם אין לו לטרוח ולילך לב"ד דהרי קיי"ל עביד אינש דינא לנפשיה כמ"ש בסי' ד' ע"ש וגם בדעת הרמב"ם ז"ל נ"ל דאין כוונתו שנתן לו רשות למלאות כל החצר דא"כ אין סברא כלל שילך דרך עליהם וישברם בדרך הלוכו דהרי אנן סהדי דברשות כזה לא היה בעל הכדים מתרצה לזה אלא כוונתו שנתן לו רשות להכניס כדיו בחצרו אבל לא נתן לו רשות שימלאנו עד שלא ישאר לו דרך ומ"מ אם קבל עליו לשמור אע"פ שבזה שמילא כל החצר לא נתן לו רשות מפורש מ"מ אין לו לבעל החצר לעשות לו היזק בהילוכו כיון שקבל לשמרם ולפ"ז לא פליגי רבותינו לדינא כלל: