Anal gland
The anal glands or anal sacs are small glands found near the anus in many mammals, including dogs and cats. They are paired sacs located on either side of the anus between the external and internal sphincter muscles. Sebaceous glands within the lining secrete a liquid that is used for identification of members within a species. These sacs are found in all carnivora, including bears,sea otters and kinkajous.
Humans
The anal glands are located in the wall of the anal canal. They secrete into the anal canal via anal ducts which open into the anal crypts along the level of the dentate line. The glands themselves are located at varying depths in the anal canal wall, some in between the layers of the internal and external sphincter (the intersphincteric plane). The cryptoglandular theory states that obstruction of these ducts, presumably by accumulation of foreign material (e.g. fecal bacterial plugging) in the crypts, may lead to perianal abscess and fistula formation.
Dogs