Actions of mapping class groups and automorphism groups of free groups