Abdullah ibn Umar relates that the Prophet ﷺ said: “There should be no envy except in two (cases): a man whom Allah has given (knowledge of) the Qur’ān, and he recites it during the night and day, and a man whom Allah has given wealth, and he spends it during the night and day (in a rightful way).”
(Bukhari and Muslim)
The hadith prohibits envy save and except in two cases. The word it uses for envy is rashk. Rashk means that one wishes to enjoy the things which others have without wishing that they should be deprived of them so that only he may get the benefit. While envy carries this element of deprivation of others to the sole benefit of the envying person. There is no equivalent word in English for rashk.
The hadith says that there is no harm in being enviable of someone in a positive manner. One case in which to be enviable of someone is permissible, as per the hadith, is that of a person whom Allah has blessed with the knowledge of the Qur’ān and he recites it day and night. Like that person, one can wish and try to achieve that blessing.
The other case in which there is no harm in being enviable of someone is that of a person whom Allah has blessed with His bounties and made him wealthy and he spends his wealth during the day and night to help others in need and to support the cause of Islam.