A captain commanded a company. I think 'temporary' also meant not a 'regular' commission. There was also a nasty connotation 'temporary gentleman'. The term was not used in WWII. After WWI, units were commanded by one rank higher, so company commanded by a major and still is. Never understood it although it was explained to me.
Not always, Captains are usually 2ics of a Company and as you mention the permanent rank for a Infantry Company Commander was a Major.
Temporary, Acting and Unpaid are terms frequently seen in Officer Field Returns in WW2 War Diaries. Temporary means a temporary promotion to replace a officer killed, wounded or posted away from the unit. It gives the flexibility of being able to return the officer to his/her substantive rank without too much paperwork.