It is not my idea, but one that I got from a (UK) Channel 4 TV programme about rented properties back in about 1984; if you fix something to the wall of a rented property it becomes part of the fixtures and fittings. I have installed kitchen wall units in this manner, and when we left that property, to the absolute dismay and utter disgust of our then landlord (who thought he was getting the almost new kitchen wall units) only a set of timber rails were left fixed onto the wall. The most successful use of this angled rail for me, was to fit the bowl boxes to the sides of the kennels that my lurchers had, as it meant the bowl boxes could be removed on a regular basis for cleaning. I now have three planter boxes fitted to two of my IBC water tanks using this method: https://www.instructables.com/id/Cladding-a-1000-ltr250-gallon-IBC-water-tank/ and they are currently filled with various small Alpine Succulents, Pansies, Violas, and Petunias.
I have used reclaimed pallet timbers throughout this little project, but there is no reason you cannot use better quality wood. A word of advice; if you paint these rails with gloss paint, be sure to cover the mating surfaces of the angle cuts with some tape; electrical tape, gaffer tape, duct tape, etc. as this will prevent the two painted surfaces sticking together.
Step 1: Marking Out and Setting Up.
Set the saw to cut at 45* and then set the rip fence/cutting guide so the saw blade cuts along the mitred line. Please remember to have the saw unplugged when setting up, or in my case the battery removed from my cordless circular saw ... wood is a lot cheaper than fingers!
Cut the full length of your chosen piece of timber at 45*: