# System() call doesn't work

**URL:** <https://forum.legato.io/t/system-call-doesnt-work/5711>\
**Category:** Uncategorized\
**Created:** [April 14, 2021, 6:25pm UTC](https://forum.legato.io/t/system-call-doesnt-work/5711 "2021-04-14T18:25:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![piinst](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@piinst](https://forum.legato.io/u/piinst)\
**Post date:** [April 14, 2021, 6:25pm UTC](https://forum.legato.io/t/system-call-doesnt-work/5711/1 "2021-04-14T18:25:13Z")

</div>

I’m trying to use system() to execute a Linux command inside an application but it appears not to work. Has anyone been successful with this?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [April 15, 2021, 12:30am UTC](https://forum.legato.io/t/system-call-doesnt-work/5711/2 "2021-04-15T00:30:42Z")

</div>

I remember it should not be a problem on unsandboxed app:

> [@Legato legacy App - Directory permissions](https://forum.legato.io/t/legato-legacy-app-directory-permissions/3184/2):
>
> I tried on WP750x. I put the test script here: root@swi-mdm9x15:/tmp# cat test.sh echo \> /tmp/123.txt After that I run a unsandboxed legato application: #include “legato.h” COMPONENT\_INIT { system(“/tmp/test.sh”); LE\_INFO(“Hello, world.”); } I can create /tmp/123.txt.

---

<div class="post-metadata">

**Author:** ![piinst](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@piinst](https://forum.legato.io/u/piinst)\
**Post date:** [April 19, 2021, 2:31pm UTC](https://forum.legato.io/t/system-call-doesnt-work/5711/3 "2021-04-19T14:31:30Z")

</div>

Thanks, yes it works OK on unsandboxed.
