In this paper, we study partial automorphisms and, more generally, injective partial endomorphisms of a finite undirected path from Semigroup Theory perspective. Our main objective is to give formulas for the ranks of the monoids IEnd(P_n) and PAut(P_n) of all injective partial endomorphisms and of all partial automorphisms of the undirected path P_n with n vertices. We also describe Green's relations of PAut(P_n) and IEnd(P_n) and calculate their cardinals.