Set correct file attributes