Sec. 3276. Incident to the foreclosure of a mortgage pursuant to the provisions of this chapter, the mortgagee, his agents and assigns shall have a right to enter upon the mortgaged premises for the purpose of posting or serving the notices required by this chapter.