Fix ownership of config and state directories