Inserted 'sudo' in front of commands to be executed as root.