Connecting your intestine to an opening created in your abdomen. The surgeon may attach your colon (colostomy) or small intestine (ileostomy) to an opening created in your abdomen. This allows waste to leave your body through the opening (stoma). You may wear a bag on the outside of the stoma to collect stool. This can be permanent or temporary.