# FTP File Read Access Denied

**URL:** <https://discourse.nodered.org/t/ftp-file-read-access-denied/79927>\
**Category:** General\
**Created:** [19 July 2023 07:16 UTC](https://discourse.nodered.org/t/ftp-file-read-access-denied/79927 "2023-07-19T07:16:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [19 July 2023 07:16 UTC](https://discourse.nodered.org/t/ftp-file-read-access-denied/79927/1 "2023-07-19T07:16:06Z")

</div>

Hello NR Team,  
I am Trying to read a file from remote ftp server. But I am receiving error access denied.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/74c0c331ab088300615696d5b6743743d440872e.png)

```auto
[
    {
        "id": "8c9f40dfe34c996a",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "2d15e0ae3c021f91",
        "type": "ftp in",
        "z": "8c9f40dfe34c996a",
        "ftp": "3ff000adc12c66a2",
        "operation": "list",
        "filename": "backup/WD008DA2",
        "localFilename": "",
        "name": "",
        "x": 330,
        "y": 40,
        "wires": [
            [
                "7b44bfa7a13102fc"
            ]
        ]
    },
    {
        "id": "ebaa3e94ed1cfb7b",
        "type": "debug",
        "z": "8c9f40dfe34c996a",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 740,
        "y": 40,
        "wires": []
    },
    {
        "id": "32e7857053c83cf9",
        "type": "inject",
        "z": "8c9f40dfe34c996a",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 160,
        "y": 40,
        "wires": [
            [
                "2d15e0ae3c021f91"
            ]
        ]
    },
    {
        "id": "7b44bfa7a13102fc",
        "type": "function",
        "z": "8c9f40dfe34c996a",
        "name": "function 1",
        "func": "msg.payload=msg.payload[26782];\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 500,
        "y": 40,
        "wires": [
            [
                "ebaa3e94ed1cfb7b"
            ]
        ]
    },
    {
        "id": "37c23ceb12e50d38",
        "type": "zip",
        "z": "8c9f40dfe34c996a",
        "name": "",
        "mode": "decompress",
        "filename": "",
        "compressionlevel": 6,
        "outasstring": false,
        "x": 730,
        "y": 160,
        "wires": [
            []
        ]
    },
    {
        "id": "095b2a645732137d",
        "type": "debug",
        "z": "8c9f40dfe34c996a",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 760,
        "y": 220,
        "wires": []
    },
    {
        "id": "6ff7e20d7e254180",
        "type": "inject",
        "z": "8c9f40dfe34c996a",
        "name": "read",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 130,
        "y": 220,
        "wires": [
            [
                "e6088fc20d358684"
            ]
        ]
    },
    {
        "id": "e6088fc20d358684",
        "type": "function",
        "z": "8c9f40dfe34c996a",
        "name": "function 3",
        "func": "msg.filename = \"WD008DA2_MODBUS_230712_073101.csv.gz\";\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 320,
        "y": 220,
        "wires": [
            [
                "d2f3bb84c6784a30"
            ]
        ]
    },
    {
        "id": "d2f3bb84c6784a30",
        "type": "ftp in",
        "z": "8c9f40dfe34c996a",
        "ftp": "a7676b1a.e9714",
        "operation": "get",
        "filename": "backup/WD008DA2",
        "localFilename": "",
        "name": "",
        "x": 490,
        "y": 220,
        "wires": [
            [
                "095b2a645732137d"
            ]
        ]
    },
    {
        "id": "3ff000adc12c66a2",
        "type": "ftp",
        "host": "103.117.180.48",
        "port": "21",
        "secureOptions": "",
        "user": "mainftp",
        "connTimeout": "10000",
        "pasvTimeout": "",
        "keepalive": ""
    },
    {
        "id": "a7676b1a.e9714",
        "type": "ftp",
        "host": "103.117.180.48",
        "port": "21",
        "secureOptions": "",
        "user": "mainftp",
        "connTimeout": "1000",
        "pasvTimeout": "",
        "keepalive": ""
    }
]

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 July 2023 18:22 UTC](https://discourse.nodered.org/t/ftp-file-read-access-denied/79927/2 "2023-07-19T18:22:29Z")

</div>

add a `catch` node and connect it to a `debug` node (set output to display the complete msg object) and see if that shows anything.

You do have a valid user and password...correct?

---

<div class="post-metadata">

**Author:** ![bachloo.rahul](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bachloo.rahul](https://discourse.nodered.org/u/bachloo.rahul)\
**Post date:** [23 July 2023 14:38 UTC](https://discourse.nodered.org/t/ftp-file-read-access-denied/79927/3 "2023-07-23T14:38:46Z")

</div>

> [@zenofmud](#):
>
> add a `catch` node and connect it to a `debug` node (set output to display the complete msg object) and see if that shows anything.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c98d212292406a21f448b067756d8653faa714a2.png)  
Yes Username and Password are correct as i am able to list file from above node red flow.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 July 2023 14:54 UTC](https://discourse.nodered.org/t/ftp-file-read-access-denied/79927/4 "2023-07-23T14:54:14Z")

</div>

I have had little success using any of the FTP nodes. Instead I use Exec nodes to run the system commands to achieve what I want with FTP.

---

<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:** [21 September 2023 14:55 UTC](https://discourse.nodered.org/t/ftp-file-read-access-denied/79927/5 "2023-09-21T14:55:13Z")

</div>

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