# Remote execution of a script trigged by Particle cloud event

**URL:** <https://community.particle.io/t/remote-execution-of-a-script-trigged-by-particle-cloud-event/42463>\
**Category:** Raspberry Pi\
**Created:** [June 17, 2018, 9:58am UTC](https://community.particle.io/t/remote-execution-of-a-script-trigged-by-particle-cloud-event/42463 "2018-06-17T09:58:01Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![nrobinson2000](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/nrobinson2000/32/15624_2.png) [@nrobinson2000](https://community.particle.io/u/nrobinson2000)\
**Post date:** [June 19, 2018, 3:30pm UTC](https://community.particle.io/t/remote-execution-of-a-script-trigged-by-particle-cloud-event/42463/4 "2018-06-19T15:30:41Z")

</div>

This thread might help you:

> [@Remote script execution on Pi](https://community.particle.io/t/remote-script-execution-on-pi/27692/9):
>
> 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-execution-of-a-script-trigged-by-particle-cloud-event/42463)._
