The recruits and the sergeant are members of the military and subject to the Uniform Code of Military Justice. s893 says:
Any person subject to this chapter who is guilty of cruelty toward, or oppression or maltreatment of, any person subject to his orders shall be punished as a court-martial may direct.
The recruit could bring a complaint to their CO who would investigate and, if it had merit, convene a court martial. However, apart from the physical assault, it’s unlikely that the conduct portrayed would meet the threshold of “cruelty toward, or oppression or maltreatment of” by the standards of the time and possibly not even by today’s standards. The abuse has a training purposes the sergeant is being deliberately and extremely provocative to to determine who has self-control under such provocation and who doesn’t, who has self-discipline and who doesn’t and who needs more and less training in that area.
Of course, the training methods of the US Marines at the time were positively humane compared to those of Soviet Albania and the USSR (Chechnya) and even of the French Foreign Legion.
Under no1 circumstances would a recruit be legally entitled to assault the sergeant
s891 is quite clear:
Any warrant officer or enlisted member who—
(1) strikes or assaults a warrant officer, noncommissioned officer, or petty officer, while that officer is in the execution of his office;
(2) willfully disobeys the lawful order of a warrant officer, noncommissioned officer, or petty officer; or
(3) treats with contempt or is disrespectful in language or deportment toward a warrant officer, noncommissioned officer, or petty officer, while that officer is in the execution of his office;
shall be punished as a court-martial may direct.
1 Self-defence from imminent risk of death and training excepted.