Rhys Murphy's second league goal of the season and a first of the campaign for Brian Woodall sealed the first three points of the season for Dagenham in the Sky Bet League Two clash.
Youngster Murphy kept his composure to strike after 36 minutes, racing on to a Woodall through-ball to beat the offside trap before rounding stranded York goalkeeper Michael Ingham to tap home right footed from a narrow angle.
Woodall himself sealed the Minstermen's fate 11 minutes from time. Neatly controlling a long cross-field pass from Femi Ilesanmi on his chest, the striker poked the ball beyond Ingham to seal all three points for Wayne Burnett's side.
Commenting on the Daggers' performance, Hackett dedicated the result to the fans, saying: "It was a fantastic win. We're really pleased to put three points on the board with our first home game. Obviously last season we were unfortunate not to get the win, but this one was for the fans.
"I think any team can beat any team at this level. We showed a lot of promise against Brentford on Tuesday night, and we weren't surprised that we won 2-0 because we know we've got that in our locker."