Ibn Mashish (Allah be pleased with him), d. 622 AH, was one of the great masters of the spiritual path of sufism, and was the teacher and guide of Imam Abu’l Hasan al-Shadhili.
From Ibn Mashish’s Advice to Imam Shadhili:
Abu’l Hasan al-Shadhili said, “My dearly beloved [namely, Ibn Mashish] counseled me: Abu’l Hasan, take not a single step unless you are hopeful of Allah’s reward therein; sit not except where you’re safe from disobeying Allah; keep only the company of one who assists you in obeying Allah Most High; and choose only those who increase you in certitude–and these are few indeed.”
And Allah alone gives success.
See: Moulay Abd as-Salam ibn Mashish