The factories in Russia and China didn't have capitalist masters. Instead the communist party leadership were the masters. Socialism doesn't eliminate masters. It just appoints them.
Socialism has nothing to do with how business is organised. Economic system defines/does that.