Some verbs such as advise, recommend, permit, allow, require, forbid are used in sentences either gerund or infinitive. For instance,
The plumber recommended buying a new water heater.
The plumber recommended me to buy a new water heater.
I wonder that in the second sentence, is it appropriate to use the gerund form (buying) instead of the infinitive.
What about other verbs?
The rules do not permit keeping pets on the premises.
The rules do not permit tenants to keep pets on the premises.