Two other accused were released in a surprise decision after the prosecution had called for sentences of up to 15 years for the men.
The pirates seized 30 crew members of the luxury yacht Le Ponant in the pirate-infested waters in April 2008 and held them for ransom.
French special forces arrested the six men, aged 25 to 50, in an airborne operation after a ransom had been paid.
Only one of them, Ismael Ali Samatar, admitted to being a pirate. He received the heaviest 10-year sentence. Two others admitted to having been aboard the elegant 88-metre three-master but only to sell goats, cigarettes and the mild narcotic khat.
The other three deny ever having set foot on the boat.
The two youngest men were released after having spent four years in a French jail.
A total of 22 Somalis are being held by France in connection with four hostage-taking incidents.
Last year a Paris court jailed five pirates for between four and eight years for hijacking the Carre d'As in the Gulf of Aden in September 2008. A sixth alleged pirate was acquitted.
Prosecutors are appealing those sentences as being too lenient.