Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:19648Abū Saʿīd b. Abū ʿAmr > Abū al-ʿAbbās al-Aṣam > al-Rabīʿ > al-Shāfiʿī

[Machine] Al-Shafi'i, may Allah have mercy on him, said, "Whoever passes by a person's farm, livestock, or any other of his possessions, should not take anything from him except with his permission. This is because there is no book or established Sunnah that permits it. Therefore, it is forbidden to take someone's property without their permission, and Allah knows best. It has been said that if one passes by a wall, they may eat from it but should not take a handful. A hadith has been narrated concerning this, if it were authenticated by us, we would not oppose it. However, the established Sunnah and hadith states that it is not permissible to eat someone's property without their permission. The Sheikh said, as for the one who says this statement, it is 'Umar ibn al-Khattab."  

البيهقي:١٩٦٤٨أَخْبَرَنَا أَبُو سَعِيدِ بْنُ أَبِي عَمْرٍو ثنا أَبُو الْعَبَّاسِ الْأَصَمُّ أنبأ الرَّبِيعُ قَالَ

قَالَ الشَّافِعِيُّ رَحِمَهُ اللهُ مَنْ مَرَّ لِرَجُلٍ بِزَرْعٍ أَوْ مَاشِيَةٍ أَوْ غَيْرِ ذَلِكَ مِنْ مَالِهِ لَمْ يَكُنْ لَهُ أَخْذُ شَيْءٍ مِنْهُ إِلَّا بِإِذْنِهِ؛ لِأَنَّ هَذَا مِمَّا لَمْ يَأْتِ فِيهِ كِتَابٌ وَلَا سُنَّةٌ ثَابِتَةٌ بِإِبَاحَتِهِ فَهُوَ مَمْنُوعٌ لِمَالِكِهِ إِلَّا بِإِذْنِهِ وَاللهُ أَعْلَمُ قَالَ وَقَدْ قِيلَ مَنْ مَرَّ بِحَائِطٍ فَلْيَأْكُلْ وَلَا يَتَّخِذْ خُبْنَةً وَرُوِيَ فِيهِ حَدِيثٌ لَوْ كَانَ يَثْبُتُ مِثْلُهُ عِنْدَنَا لَمْ نُخَالِفْهُ وَالْكِتَابُ وَالْحَدِيثُ الثَّابِتُ أَنَّهُ لَا يَجُوزُ أَكْلُ مَالِ أَحَدٍ إِلَّا بِإِذْنِهِ قَالَ الشَّيْخُ أَمَّا قَائِلُ هَذَا الْقَوْلِ فَعُمَرُ بْنُ الْخَطَّابِ ؓ