Sayyiduna Ibn Abbas (may Allah be pleased with them both) says concerning this saying of Allah, the Mighty and Majestic, "Whatever palm trees you cut down or left standing on their roots, it was by the permission of Allah": "'Al-linah' means the date palm. And concerning 'and so that He may disgrace the transgressors' he said: (The Muslims) brought (the enemy) down from their fortresses, and they were ordered to cut down the date palms, and some hesitation arose in their hearts (about this act). So the Muslims said: We have cut down some trees and left some; we shall certainly ask the Messenger of Allah (peace and blessings be upon him) whether we will have any reward for cutting down those trees, and whether there is any sin upon us for leaving them. Then Allah, the Mighty and Majestic, revealed this verse: 'Whatever palm trees you cut down or left standing on their roots, it was by the permission of Allah, and so that He may disgrace the transgressors.'"
No one narrated this hadith from Habib bin Abi Amrah (may Allah have mercy on him) except Hafs (may Allah have mercy on him), and Affan (may Allah have mercy on him) is alone in transmitting it from him.
Hadith Referenceالمعجم الأوسط / باب الألف / 587
Hadith Takhrij«أخرجه الضياء المقدسي فى «الأحاديث المختارة» برقم: 143، والنسائي فى «السنن الكبرى» برقم: 8556، 11510، والترمذي فى «جامعه» برقم: 3303، والبزار فى «مسنده» برقم: 5146، وابن أبي شيبة فى «مصنفه» برقم: 33830، والطحاوي فى «شرح مشكل الآثار» برقم: 1111»