reversed order so chmod is valid