"I am using the default pi account which I believe is the RPi equivalent to root."
That's an incorrect assumption.
Raspbian, the OS of the Raspberry Pi, which is Linux, creates the pi user account, and it's the default standard user. root is the super user account. You execute commands as root using sudo. It's highly unlikely that with what you're doing, you need super user access. Don't use super user access except when absolutely necessary, and use the super user account for as short a duration as possible.