We provide combinatorial interpretation for the $gamma$-coefficients of the basic Eulerian polynomials that enumerate permutations by the excedance statistic and the major index as well as the corresponding $gamma$-coefficients for derangements. Our results refine the classical $gamma$-positivity results for the Eulerian polynomials and the derangement polynomials. The main tools are Brandens modified Foata--Strehl action on permutations and the recent triple statistic (des, rix,aid) equidistibuted with (exc, fix, maj).