“This has always been a private person with private money on private land helping the homeless,” said Mr. Lewis, who filed a lawsuit Tuesday appealing the city’s refusal to exempt him from zoning rules, which ban camping. “I don’t want anything from the government. I don’t want any of that. We can take care of these people.”

Mr. Lewis, an auctioneer and the owner of a marketing business, has no experience in social work and never planned to be landlord to 40 or so homeless people.

But during an unsuccessful campaign for mayor, Mr. Lewis befriended several homeless people in Akron, an industrial city that boasts of being the “rubber capital of the world” but has lost factories and residents over the last 50 years as part of a broad decline in manufacturing. Last year, when a few of Mr. Lewis’s homeless friends asked to pitch tents behind a commercial building he owns, he approved.

Mr. Lewis’s building, a large brick structure with rented office space, is off a busy street in a down-on-its-luck part of Akron that includes retail outlets and apartments but few houses.

At first, the campsite was informal and rowdy, a handful of tents in a semi-secluded patch of grass. As time passed, more tents sprung up and the camp became more structured. Homeless people washed their clothes, showered and socialized in the basement of Mr. Lewis’s building. Residents took turns picking up trash, conducting security patrols and vetting newcomers. And a question emerged: Was all this legal?