Any person who has a legal estate in real property, and a present right to the possession thereof, may recover such possession, with damages for withholding the same, by an action. Such action shall be commenced against the person in the actual possession of the property at the time, or, if the property is not in the actual possession of anyone, then against the person acting as the owner thereof.