The Messenger of Allah ﷺ said, "Charity is not lawful for a wealthy person except in five cases. For one who works to collect it, for one fighting in the path of Allah, for a wealthy person who purchases it with his own money, for a poor person who receives it as charity and then gives it as a gift to a wealthy person, or for one burdened with debt."
قال رسول الله ﷺ: لا تحل الصدقة لغني إلا لخمسة: لعامل عليها، أو لغاز في سبيل الله، أو لغني اشتراها بماله، أو فقير تصدق عليه فأهداها لغني، أو غارم.
Reported by Abu Dawud (1636) and Ibn Majah (1841), the wording being his, both from the hadith of Abdul-Razzaq, and it is also in his Musannaf (7151). He said, Mamar narrated to us, from Zayd bin Aslam, from Ata bin Yasar, from Abu Saeed Khudri, and he mentioned it. Ibn Khuzayma (2374) and Hakim (1/407) graded it sahih, and both of them narrated it by this route. Hakim said, "Sahih according to the criterion of the two Shaykhs, though they did not include it because Malik bin Anas transmitted it from Zayd bin Aslam as a mursal." He then narrated it by the route of Malik as mursal and said, "This does not meet my criterion in the introduction of the book, yet it is sahih. Malik sometimes transmits a hadith as mursal and sometimes connects it and gives its full chain. He is trustworthy, and the ruling belongs to the trustworthy narrator who connects it and gives its chain." End of quote.As for the mursal hadith of Malik, it was also narrated by Abu Dawud (1635) from Abdullah bin Maslama (that is, Qanabi), from him, with his chain, in the same manner. It is also found in the Muwatta in the chapter on zakat (29).This hadith has been established as sahih both as mursal and as connected, for Mamar, who connected it, was not alone in doing so. Abdul-Razzaq (7152) narrated it from Thawri, from Zayd bin Aslam, from Ata bin Yasar, from a man among the companions of the Prophet ﷺ, in the same manner. He did not mention the name of the companion, but this does no harm. It may well have been Abu Saeed, but due to uncertainty he was not named.However, Abu Dawud said, "Ibn Uyayna narrated it from Zayd just as Malik said. And Thawri narrated it from Zayd, saying, 'The reliable one narrated to me from the Prophet ﷺ.'" It appears from this that he favors the mursal version. But was the narration of Thawri that reached Abu Dawud actually like this? Or did an error occur in it from someone before Thawri, or did Thawri sometimes narrate it this way and sometimes say "from a man among the companions of the Prophet ﷺ," as Abdul-Razzaq narrated it? The most likely explanation is that this variation comes from Thawri himself. In any case, the narration of Thawri strengthens the connected narration of Mamar.Ibn Abdul-Barr indicated that a group of narrators transmitted this hadith as connected from Zayd bin Aslam.