قال جمهور العلماء يحرُم الجهاد إذا منع الأبَوان أو احدهما بشرط أن يكونا مسلمَين لأن برّهما فرض عينٍ عليه والجهاد فرض كفاية فإذا تعيّن الجهاد فلا إذن ويشهد له ما أخرجه إبن حبان من طريق أخرى عن عبدالله بن عمرو جاء رجل إلى رسول الله ﷺ فسأله عن أفضل الأعمال قال الصلاة قال ثم مهْ قال الجهاد قال فإن لي وا لدين فقال آمرك بوالديك خيراً فقال والذي بعثك بالحق نبياً لأجاهدنّ ولأتركَنّهما قال فأنت أعلم وهو محمول على جهاد فرض العين توفيقاً بين الحديثين
فتح الباري لإبن حجر العسقلاني كتاب الجهاد
The body of scholars have said that jihad is forbidden if the parents, or one of them, prohibit it, provided they are both Muslims, since devotion to them is one’s individual obligation [fard ‘ain], while jihad is a collective obligation [fard kifaya]. But whenever jihad is determined as one’s duty, permission need not be considered. The separate narration recorded by Ibn Hibban as related by Abdullah ibn ‘Amr testifies to this: A certain man came to the Messenger of Allah (SAW) and asked him about the best of deeds. He said: Prayer. The man said: And then what? He said: Jihad. The man said: But indeed I have parents. He said: I order you to be good to your parents. And the man said: I swear by Him who sent you forth with the truth as a prophet, surely I will wage jihad, and surely I will leave them. He said: You know best. And so this implies a jihad of personal duty, reconciling both hadiths.
Ibn Hajar Al-Asqalani, Fath Al-Bari, The book of jihad