Should torrent files of copyrighted work be legal or illegal?

A torrent file of a copyrighted work is not the copyrighted file itself, but a link to people who share the file. Should such torrent file be treated as illegal, or the only illegal act is done by the people who share the file itself?