Attach Shower Rod with Glue
Before using any adhesive to secure a shower curtain rod, I think you'd have more success keeping it in place with an expanding or screw- type rod. It's the same idea as the chin-up bars that mount in a doorway. The rubber stops at each end of the rod prevent mars and wall damage. I've seen them turned so tight the tile cracked! But if you still need some adhesive types: '100 % silicone' (any brand as long as it is 100%) not only seals out liquids it has surprisingly good adhesive properties. If you have no intention of ever removing the rod then use a 'urethane' caulking. This is silicone on steroids! It is used in the construction sector to positively seal joints of differing materials (forever). Those are the only two I would use in a wet environment. 2 part epoxies might hold for awhile, but any flex in the shower rod will over time loosen from the epoxy. Good luck.