Joseph supervised the gathering up of all the great stores of food of the seven years of abundance and strategically placed them in various walled cities near where the harvest was gathered.
So Joseph gained possession of all the farmland in Egypt for Pharaoh. Every Egyptian sold his land in exchange for food, for the famine was that severe. Eventually, the Egyptians had transferred all the land to Pharaoh.
However, he did not take over the land of the priests, for they received royal subsidies from Pharaoh. They lived on the food he provided for them, and that is why they did not have to sell their land.