Fixing ownership and permissions issues, and disabling auto keygen on start