move the chown command to after creating conf files.