It is legal if the files being shared are not licensed or copyrighted. It's perfectly fine to share files that are within the public domain but outside of this area, torrenting is illegal in many areas. Read more