Morale at San Francisco State University has at times been as gray as the fog rolling in off the ocean. Strained relations between students and the administration. Tension among ethnic groups. Resentment within faculty.

But a warming trend is taking hold on the campus of nearly 29,000 students — and many credit their new president, Lynn Mahoney, a former provost of Cal State Los Angeles and now San Francisco State’s 14th president. She arrived this semester — the university’s first permanent female president — and replaced Leslie Wong, who retired after seven years.

Hopes are high that Mahoney can restore unity at the fractured campus that anchors the southwest corner of the city.

“Hi, I’m Lynn Mahoney, university president. Nice to meet you!” the slender woman with short, dark hair said the other day as she approached a woman in the student services center and stuck out her hand.

Colette Cowan, an outreach specialist preparing to retire after 36 years of helping applicants, wasn’t about to waste the opportunity when Mahoney asked how many campus tours students lead each year.

“Not enough,” Cowan told the president. “If we had more resources, they could do more. Students need employment. We really need to give them hours so they can survive in the city.”

Mahoney, 55, listened and nodded. She likes to wander around campus each week with different guides, getting to know people. On this warm fall morning, she greeted students on Malcolm X Plaza before entering the Student Union.

“She seems interested in listening to us and working with us,” said James Martel, a political science professor who often sees a dispirited side of campus as head of the faculty union that helps aggrieved instructors. “Even if it’s just a honeymoon period, I’ll happily take it.”

Student leaders say they’ve met with Mahoney three times already — at her request.

“She said, ‘I need students’ voices all around,’” said student body President Preyansh Kotecha, a computer science major. “That was a big eye-opener.”

Nancy Gerber is also pleased. As president of the Academic Senate and chair of the chemistry and biochemistry department, Gerber has the ear of professors. She’s impressed by Mahoney’s ability to join in academic discussions — not always an administrator’s forte. “She knows data and research around student success. That’s really, really welcome,” Gerber said.

Also, Gerber said, “she’s just a very genuinely warm person who remembers names and who treats you like you matter. That resonates on campus, because we’ve lost a sense of community.”

Why? “Housing, housing, housing,” Gerber said. “Our faculty are being forced farther away and into longer commutes. Same thing for students. We’re struggling to connect with them.”

As president, Mahoney will oversee “Future State 2035,” a plan launched by Wong that promises to “dramatically change the SF State campus from one primarily for commuters to one that offers a range of housing options.” The idea is to house 40% of students and 15% of employees with thousands of beds and hundreds of apartments.

If there’s money. Today, roughly 14% of the 28,880 students live on campus. But already that’s changing. A 560-bed student residence is under construction on Holloway Avenue at 19th Avenue, set to open next fall.

“It will be a wonderful addition,” Mahoney said.

Racial and ethnic issues have also ripped through the campus that recently celebrated the 50th anniversary of the country’s only College of Ethnic Studies, born of student demands for diversity.

In March, after three years of acrimony and court fights, Jewish students reached a legal settlement with administrators, whom they had accused of tolerating anti-Semitism. The students sued the university and Associate Professor Rabab Abdulhadi, director of Arab and Muslim Ethnicities and Diasporas Studies, in 2017 after pro-Palestinian classmates shouted down Jerusalem Mayor Nir Barkat in 2016. In turn, Abdulhadi sued the university in state and federal court this year, claiming discrimination. The university denied the allegations, and a trial in the federal case has been set for 2021.

There are other sources of tension. When Wong announced cuts to the College of Ethnic Studies in 2016 because of a shortfall, angry students staged a hunger strike. Hundreds more confronted the administration and booed the president even as he vowed to find the money elsewhere. The college’s former dean, Kenneth Monteiro, has pursued legal actions against the university since 2017, saying administrators wrongly blamed him for the troubles.

Meanwhile, complaints by black instructors about racial bullying from white instructors are a perennial problem, said the union’s Martel.

Since arriving, Mahoney has met with the Muslim Students Association, the General Union of Palestinian Students, and with Jewish students from Hillel. She had lunch with La Raza students and sat down with the Black Student Union, among others.

“We have to make all students feel welcome and safe,” she said.

A New Yorker, Mahoney is the daughter of a salesman and a mom who returned to college in her 40s to earn a computer science degree. As a child, Mahoney sometimes joined her mother in class — but never expected to go to college because the professors spoke too quickly.

But she did go, earning a bachelor’s degree in American Studies from Stanford and a doctorate in history from Rutgers.

“I was going to be a history professor,” said Mahoney, who did that, specializing in U.S. and women’s history, feminism, race, and ethnicity.

In 2000, she discovered something unexpected: Students at her school, Purchase College-State University of New York, kept dropping out.

“I was shocked,” she said. “Parents who drop you off at a university — they expect you to leave with a degree.”

She became an administrator devoted to making that happen.

At SF State, where Mahoney earns $367,690, with a $60,000 housing allowance, she’ll also oversee the legal settlement with Jewish students. Its requirements include hiring a coordinator of Jewish Student Life, assessing anti-discrimination policies, promoting “equity on the basis of religious identity” and installing a tolerance mural designed by students of differing viewpoints.

“I sense a much calmer campus climate since Dr. Mahoney’s arrival,” said Marc Dollinger, a Jewish studies professor. He praised not only the hiring of the Jewish Student Life coordinator — done last semester under Wong — but also Mahoney’s hiring of a Muslim Student Life coordinator this semester. “I believe the purpose of a university, and SF State in particular, is to engage difference.”

Abdulhadi, meanwhile, showed Mahoney a profanity-riddled death threat she received and told the president of her success in building her academic program amid what she described as an anti-Muslim atmosphere.

“It is our hope that President Mahoney will change (the) toxic campus environment that has been characterized by Islamophobia, anti-Arab and anti-Palestinian racism and discrimination, bullying, and smearing attempts,” she said.

Despite underlying tensions, students are just busy being students. And many who meet Mahoney on her campus walkabouts say they can’t believe the chief wants to say hello.

“I thought she was lying, to be honest,” senior Juliann Stiny said with a laugh. “But it was a breath of fresh air to meet the person in charge of our education.”

As for that person being a woman, Stiny said: “It’s about dang time.”

Nanette Asimov is a San Francisco Chronicle staff writer. Email: nasimov@sfchronicle.com Twitter: @NanetteAsimov