chown/chmod cache dir correctly