Bonapartes secretary naively complained how the hopes of the French invasion were shattered by the reality of the situation in Egypt. He clearly expected that the invaded would regard the French as liberators instead of attackers.
The pleasing illusions which were cherished at the outset of the expedition vanished long before our arrival in Cairo. Egypt was no longer the empire of the Ptolemies, covered with populous and wealthy cities; it now presented one unvaried scene of devastation and misery. Instead of being aided by the inhabitants, whom we had ruined, for the sake of delivering them from the yoke of the beys, we found all against us: Mamelukes, Arabs, and fellahs. No Frenchman was secure of his life who happened to stray half a mile from any inhabited place, or the corps to which he belonged. The hostility which prevailed against us and the discontent of the army were clearly developed in the numerous letters which were written to France at the time, and intercepted.
Source: Memoirs of Napoleon Bonaparte by Louis Antoine Fauvelet de Bourrienne edited by R.W. Phipps. Vol. 1 (New York: Charles Scribner's Sons, 1889) p. 164-165.