A generalized perturbation theory is established for the surface perturbation problem in which a boundary parameter or a boundary shape is disturbed. Mainly handled is a multidimensional Sturm-Liouville-type equation and finally discussed is a multigroup diffusion model. The theory is based on Green's theorem and provides perturbation formulas that have simple forms of surface integrals and are explicitly related to a deviation of boundary parameters. The formulas are connected with a quantity within a volume through the surface Green's function. The effects of surface perturbation on a solution (a neutron flux distribution) of the equation itself, on a linear functional of direct solution, and on a ratio of linear functional of direct solution are shown. The theory is also applied to a ratio of linear functional of adjoint solution and to a ratio of bilinear functional of direct and adjoint solutions. Perturbation formulas are also derived from Pomraning's variational principle, and it is shown that the formulas are identical with those based on Green's theorem. The Lagrange multipliers used in the variational principle are explained as integrated Green's functions.