For the most part, permits are not required to hike the Palmetto trail. The only permit needed is to cross part of the Fort Jackson passage.
If you have a military DBID and have access to the fort, then you can apply for the iSportsman running and cycling permit.
If you are a civilian or do not have access to the fort, you will have to report to Gate 2 before entering inside the fort's gate. At the gate, they may seem confused and may not believe you'll be allowed in, but have them direct you to the visitor center for check-in and they will do so. Inside the visitor's center, explain your purpose of the visit "to hike the Palmetto Trail" and then they'll complete a background check on you. Basically, they are trying to make sure you are not a convicted felon. If you are convicted felon, just plan on walking around the base.
Although the gate is open 24/7, the visitor center has more restricted hours depending on the time of year. At the time of this writing, they are open from 5am-8pm. The background check only takes a couple of minutes. The permit only allows you to cross the base on the day you obtained the permit (so you have one day to cross). The permit cannot be obtained beforehand.
If you are hiking southbound, you can take a slight detour (see the alternate route on the Capitol City Passage) that will allow you to obtain the permit before heading into the base. If heading northbound, you'll have to get off the trail by Gate 5 around mile marker 5. You can either walk all the way around to Gate 2, just skip the rest of the fort and walk the roads straight to the Capitol City Passage, take a Lyft to Gate 2 and plan on backtracking, or take a Lyft to the Gate and then back to the parking lot at Gate 5.