SAN FRANCISCO — In a setback for internet and telecom providers, a federal appeals court on Monday ruled that provisions in the Electronic Communications Privacy Act barring companies from disclosing government surveillance requests do not violate the First Amendment.

A unanimous panel of the U.S. Court of Appeals for the Ninth Circuit rejected arguments by the Electronic Frontier Foundation, a digital civil liberties group, that it is unconstitutional for companies to be permanently barred from disclosing any information about the requests.