Ever check out YouTube? Have a user name and password for it? Then Viacom's going to find out all about what you like to watch.

A federal judge ruled Tuesday that the online video-sharing Web site, owned by Google, has to turn over all its user logs to Viacom, the mega-corporation that owns MTV, Paramount Pictures, Comedy Central and VH1, among others.

• Click here to read the ruling (PDF).

Viacom sued Google last year, claiming that YouTube willfully infringed its copyrights by letting its users post clips from "South Park" and "The Daily Show" willy-nilly.

YouTube, citing the Digital Millennium Copyright Act of 1998, argues it doesn't have to take down those clips until Viacom complains about each and every one.

Viacom says that's bunk, and is joined in its lawsuit by the Premier League of England's Football Association, which doesn't like pro soccer highlights turning up on YouTube.

Judge Louis L. Stanton actually delivered a mixed ruling — he refused Viacom's demand that Google turn over YouTube's source code, the software that runs the site, agreeing with Google that that was a trade secret.

But he used Google's own argument, explained here on Google's own site, that revealing users' Internet Protocol addresses — which identify every single computer, server, cell phone or toaster connected to the Internet — does not constitute an invasion of privacy.

• Click here to visit FOXNews.com's Cybersecurity Center.

• Click here for FOXNews.com's Personal Technology Center.

Google must now turn over all its data about YouTube visitors on four 1-terabyte hard drives, a staggering amount of data, as well as copies of all clips it has ever taken down. (One terabyte is 1,000 gigabytes.)

The Electronic Frontier Foundation, a San Francisco organization that defends the rights of Internet users, quickly protested the ruling, saying it "threatens to expose deeply private information about what videos are watched by YouTube users."

Viacom wants the data to prove that copyrighted "stolen" material is more popular among YouTube visitors than original "user-generated" material.

It sought the source code to show that YouTube does have software in place to filter out some objectionable content — for example, YouTube manages to keep pornography and explicit nudity off the site — but chooses to allow copyrighted material as part of its business model.

There is no indication Viacom will seek to track down individual users. It would have to contact users' Internet service providers — for example, Time Warner Cable, Verizon or America Online — to do so, and it's not clear if the ISPs would be compelled to turn over the data, especially in a civil case.

Google is likely to appeal the ruling.

• Click here to read more about this at Wired.

• Click here to read a BBC News analysis of the ruling's legal implications.