In the hadiths of Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) and of Amr bin Shu'ayb there is a concession. Concerning a person who cannot buy anything, the Messenger of Allah (peace and blessings be upon him) said: "When he passes by an orchard, he may eat, but he should not carry off a lapful." In the hadith of Sayyiduna Umar (may Allah be pleased with him) it is mentioned that some of the Ansar passed by an Arab tribe, and when they asked them for hospitality, they refused. So they took some of their property. They told Sayyiduna Umar (may Allah be pleased with him), and he made a move against the Bedouins and said: Travellers are more entitled to the water spring at which they stop. Abu Ubayd (may Allah have mercy on him) explained that this is for one who cannot obtain hospitality or buy anything. He should call out to the herder three times so that he can first ask him for hospitality.
The Shaykh said: Al-Qasim bin Mukhawwal narrates from his father, who said: I asked the Messenger of Allah (peace and blessings be upon him): We come across camels while we are in need of milk, and their milk has been held back in their udders. He said: "Call out to the herder three times. If you get an answer, well and good; otherwise, milk them. Then leave some for those who milk them. Then tie up the udder and leave some milk so that the herders can milk."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الضحايا / 19657