Hadithcore
Mishkat al-Masabih, 2113

Ibn ‘Umar reported God’s messenger as saying, “Envy is justified only regarding two types:

a man who, having been given [knowledge of] the Qur’ān by God, stands reciting it during the night and during the day; and a man who having been given property by God, spends on others from it during the night and during the day.” (Bukhārī and Muslim.)

وَعَنِ ابْنِ عُمَرَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ:

لَا حَسَدَ إِلَّا على اثْنَيْنِ: رَجُلٌ آتَاهُ اللَّهُ الْقُرْآنَ فَهُوَ يَقُومُ بِهِ آنَاءَ اللَّيْلِ وَآنَاءَ النَّهَارِ وَرَجُلٌ آتَاهُ اللَّهُ مَالًا فَهُوَ يُنْفِقُ مِنْهُ آنَاءَ اللَّيْلِ وَآنَاءَ النَّهَار

References1 variant
In-Book Reference
Book 8, Hadith 5