High resolution X-ray spectroscopic studies on free SF6 molecules and SF6 clusters near the S 2p ionization thresholds are reported. Spectral changes occurring in clusters for the intense molecular-like S 2p 1/2,3/2 → 6a1g-, 2t2g-, and 4eg-resonances are examined in detail. Neither gas-to-cluster spectral shifts nor changes in peak shape are observed for the pre-edge 6a1g- band. Significant changes in band shape and distinct gas-to-cluster shifts occur in the S 2p 1/2,3/2 → 2t2g- and 4eg-transitions. These are found in the S 2p-ionization continua. The quasiatomic approach is used to assign the experimental results. It is shown that a convolution of asymmetric and symmetric contributions from Lorentzian and Gaussian line shapes allows us to model the spectral distribution of oscillator strength for the S 2p 1/2,3/2 → 2t2g-, and 4eg-transitions. The asymmetry is due to trapping of the photoelectron within the finite size potential barrier. The Lorentzian contribution is found to be dominating in the line shape of the S 2p → 2t2g- and 4eg-bands. The spectroscopic parameters of the spin-orbit components of both the 2t2g- and 4eg-bands are extracted and their gas-to-cluster changes are analyzed. The photoelectron trapping times in free and clustered SF6 molecules are determined. Specifically, it is shown that spectral changes in clusters reflected in core-to-valence-transitions are due to a superposition of the singly scattered photoelectron waves at the neighboring molecules with the primary and multiply scattered waves within the molecular cage.