# Remote script execution on Pi

**URL:** <https://community.particle.io/t/remote-script-execution-on-pi/27692>\
**Category:** Raspberry Pi\
**Created:** [December 2, 2016, 7:20pm UTC](https://community.particle.io/t/remote-script-execution-on-pi/27692 "2016-12-02T19:20:14Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![jvanier](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/jvanier/32/5542_2.png) [@jvanier](https://community.particle.io/u/jvanier)\
**Post date:** [December 13, 2016, 4:04pm UTC](https://community.particle.io/t/remote-script-execution-on-pi/27692/9 "2016-12-13T16:04:35Z")

</div>

> [@legoguy](#):
>
> I ran a "whoami" command with this interface, and the processes run as root.

As @nrobinson2000 mentioned, the GPIO access is done by direct memory writes to the GPIO registers which can only be done by `root`.

The `Process::run` can run commands as other users by doing `Process::run("sudo -u pi my_command");` This would prevent accidentally running commands that affect the system. This can be added to the docs, or this behavior could be the default, unless someone does `Process::run_sudo()` maybe. What do you think?

---

_[View the full topic](https://community.particle.io/t/remote-script-execution-on-pi/27692)._
