Mark Zuckerberg has been given a taste of his own medicine: his personal information is being plastered all over the web forever.

The Facebook boss has failed in a court bid to gag a magazine that published data including drunken extracts from his college diary and his social security number.

Federal judge Douglas Woodlock told the 23-year-old's lawyers on Friday that the independent Harvard alumni magazine 02138 had the right to release the documents, which were part of another court case.

02138 's investigation centred on the dispute between Zuckerberg and the operators of ConnectU, another Harvard-founded social network. It's alleged that in the early days of Facebook, "the new Bill Gates" nicked ideas and source code from brothers Cameron and Tyler Winklevoss, who had asked him to work on their project.

Digging into that period, freelance reporter Luke O'Brien turned up a series of depositions and other documents on a visit to the courthouse, and the magazine ran them in support of his article. The piece is sympathetic to the Winklevoss twins and reports accusations by classmates that Zuckerberg had lied in front of them.

Facebook lawyers applied to have the documents taken down on Thursday, saying the court had ordered them to be sealed.

A spokeswoman told the Wall Street Journal : "One reason the court ordered certain documents' protection was to prevent exactly what has happened: misusing documents and taking documents out of context to sling mud."

Their failed application also attempted to force O'Brien to reveal how he obtained the files, since they had been locked up. He has maintained he was given them by a Federal Appeals Court clerk.

The judge denied all Facebook's claims. According to the New York Times , the clerk mistakenly handed over the files to O'Brien.

Zuckerberg and Co. will be hoping Friday's decision marks the end of a run of public embarrassments for Facebook. On Thursday, it was finally forced to bow to pressure over its creepy new ad system Beacon.

There could be more privacy-related defeats ahead, however. The UK's Information Commissioner is investigating Facebook's "Hotel California" policy on user data that means accounts can only be deactivated, never deleted.

02138 's article and the Facebook files are here. ®