# Exec node can't execute 'fswebcam' command, but Raspberry Pi terminal does

**URL:** <https://discourse.nodered.org/t/exec-node-cant-execute-fswebcam-command-but-raspberry-pi-terminal-does/61262>\
**Category:** General\
**Created:** [13 April 2022 20:12 UTC](https://discourse.nodered.org/t/exec-node-cant-execute-fswebcam-command-but-raspberry-pi-terminal-does/61262 "2022-04-13T20:12:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Violet\_Raven](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@The\_Violet\_Raven](https://discourse.nodered.org/u/The_Violet_Raven)\
**Post date:** [13 April 2022 20:12 UTC](https://discourse.nodered.org/t/exec-node-cant-execute-fswebcam-command-but-raspberry-pi-terminal-does/61262/1 "2022-04-13T20:12:44Z")

</div>

Within Raspberry Pi command prompt (and through Putty since I made it so that I can control the Raspberry Pi from any device) I can run the command "fswebcam yourimage.jpg" and it makes a picture with the plugged in webcam (it's something I had to install & it works). However, when I try run this same command through a Node-RED exec node, I can't get it to work. Know that this is my first time working with Node-RED so I might just be missing something. I installed Node-RED on the Raspberry and I'm at a loss. I'm first using an inject node to activate the command, then it's linked to the command "fswebcam yourimage.jpg" and after that there's a debug node. It keeps saying "node has undeployed changes" and doesn't work. (note: after this I need to make it so that there's a node that will recognize if there's a face in the taken picture, but right now it doesn't even make the picture so I'm focussing on that)

 ![whatitiz](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/192853bdd847e352783d765ed33a1ef3dabdef9c.png)

nodes:

```auto
    {
        "id": "6a71e4b4e85e4218",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "1550834df7bac0cd",
        "type": "inject",
        "z": "6a71e4b4e85e4218",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "true",
        "payloadType": "bool",
        "x": 310,
        "y": 280,
        "wires": [
            [
                "655a689289d3959c"
            ]
        ]
    },
    {
        "id": "655a689289d3959c",
        "type": "exec",
        "z": "6a71e4b4e85e4218",
        "command": "fswebcam yourimage.jpg",
        "addpay": "",
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "winHide": false,
        "oldrc": false,
        "name": "",
        "x": 530,
        "y": 280,
        "wires": [
            [],
            [
                "ee8532fad6af31a9"
            ],
            []
        ]
    },
    {
        "id": "ee8532fad6af31a9",
        "type": "debug",
        "z": "6a71e4b4e85e4218",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 810,
        "y": 280,
        "wires": []
    }
]

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [13 April 2022 20:16 UTC](https://discourse.nodered.org/t/exec-node-cant-execute-fswebcam-command-but-raspberry-pi-terminal-does/61262/2 "2022-04-13T20:16:04Z")

</div>

Try using the full path to the executable.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [14 April 2022 06:53 UTC](https://discourse.nodered.org/t/exec-node-cant-execute-fswebcam-command-but-raspberry-pi-terminal-does/61262/3 "2022-04-14T06:53:12Z")

</div>

And to the image file as well

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 June 2022 06:54 UTC](https://discourse.nodered.org/t/exec-node-cant-execute-fswebcam-command-but-raspberry-pi-terminal-does/61262/4 "2022-06-13T06:54:06Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
