# Node-red-contrib-advanced-ftp Access rights problem?

**URL:** <https://discourse.nodered.org/t/node-red-contrib-advanced-ftp-access-rights-problem/58968>\
**Category:** General\
**Created:** [25 February 2022 07:37 UTC](https://discourse.nodered.org/t/node-red-contrib-advanced-ftp-access-rights-problem/58968 "2022-02-25T07:37:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![struland](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/struland/32/58587_2.png) [@struland](https://discourse.nodered.org/u/struland)\
**Post date:** [25 February 2022 07:37 UTC](https://discourse.nodered.org/t/node-red-contrib-advanced-ftp-access-rights-problem/58968/1 "2022-02-25T07:37:42Z")

</div>

Hello,  
In a node-contrib-advanced-ftp node I try to list a directory with workingDir parameter set.

 ![advanced-ftp-flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/8/d81aba2ea903ab768683e53587071be5ad0f9763.png)

If I try it with workingDir = /sdcard the message is "Error: No such file or directory."  
 ![advanced-ftp-list-sdcard-fail](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/221fa1c5ef19969b276994e56dbae3e13b5adc10.png)

If I try it for example with workingDir = /workspace, the result is as expected. So the ftp-node seems to work fine.

 ![advanced-ftp-list-workspace-ok](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0dcb78a8851a8d2bf3ff4c53341b1e2c5664cd80.png)

The command "LIST" on the root directory shows me, that there is a directory named sdcard.  
 ![advanced-ftp-list-sdcard](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/3/73c01b4ae94c64c5b518bc1e14500f6bd230dfbf.png)

But I can not do a LIST command with "workingDir = /sdcard".

Could that be some access rights problem?  
With FileZilla everything works. I can see the sdcard directory.  
Please help me understand. What did I miss?

```auto
[
    {
        "id": "b84cfee46673a632",
        "type": "advanced-ftp",
        "z": "ac5391a99acbd058",
        "ftp": "42a903ea.527e3c",
        "operation": "list",
        "filename": "",
        "localFilename": "",
        "workingDir": "",
        "oldPath": "",
        "newPath": "",
        "command": "",
        "recursive": false,
        "useCompression": false,
        "throwError": true,
        "showError": true,
        "name": "",
        "x": 650,
        "y": 680,
        "wires": [
            [
                "42c3d933b4e92e48"
            ]
        ]
    },
    {
        "id": "aa12a75711f7ad64",
        "type": "inject",
        "z": "ac5391a99acbd058",
        "name": "LIST workingDir = /workspace",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "workingDir",
                "v": "/workspace",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "date",
        "x": 260,
        "y": 700,
        "wires": [
            [
                "b84cfee46673a632",
                "1d82ebaab0d65f77"
            ]
        ]
    },
    {
        "id": "42c3d933b4e92e48",
        "type": "debug",
        "z": "ac5391a99acbd058",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 870,
        "y": 680,
        "wires": []
    },
    {
        "id": "1d82ebaab0d65f77",
        "type": "debug",
        "z": "ac5391a99acbd058",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 650,
        "y": 740,
        "wires": []
    },
    {
        "id": "1365805312ffa49f",
        "type": "inject",
        "z": "ac5391a99acbd058",
        "name": "LIST workingDir = /sdcard",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "workingDir",
                "v": "/sdcard",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "date",
        "x": 250,
        "y": 740,
        "wires": [
            [
                "b84cfee46673a632",
                "1d82ebaab0d65f77"
            ]
        ]
    },
    {
        "id": "0a7509bc7ff43d72",
        "type": "inject",
        "z": "ac5391a99acbd058",
        "name": "LIST /",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "date",
        "x": 190,
        "y": 660,
        "wires": [
            [
                "b84cfee46673a632"
            ]
        ]
    },
    {
        "id": "42a903ea.527e3c",
        "type": "advanced-ftp-config",
        "host": "192.168.2.233",
        "port": "21",
        "secure": false,
        "secureOptions": "",
        "user": "Admin",
        "connTimeout": "",
        "pasvTimeout": "",
        "keepalive": "",
        "name": ""
    }
]

```

---

<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:** [25 February 2022 10:09 UTC](https://discourse.nodered.org/t/node-red-contrib-advanced-ftp-access-rights-problem/58968/2 "2022-02-25T10:09:49Z")

</div>

What are the ownership and access rights of the two directories?

---

<div class="post-metadata">

**Author:** ![struland](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/struland/32/58587_2.png) [@struland](https://discourse.nodered.org/u/struland)\
**Post date:** [25 February 2022 18:35 UTC](https://discourse.nodered.org/t/node-red-contrib-advanced-ftp-access-rights-problem/58968/3 "2022-02-25T18:35:18Z")

</div>

This is what I get with ls -al

```auto
UN65HSXXM01000535 admin@UV4:/mnt$ ls -al
drwxrwxrwt 8 root root 160 Feb 25 10:41 .
drwxr-xr-x 17 root root 4096 Jan 20 2020 ..
drwxrwxrwt 2 root root 60 Feb 25 10:42 .psplash
drwxr-xr-x 17 root root 4096 Jan 20 2020 configos
drwxrwsr-- 7 root data 4096 Feb 25 11:16 data
drwxr-xr-x 4 root root 4096 Jan 14 2020 factory
drwxrwxr-x 6 root admin 32768 Jan 1 1970 sdcard
drwxrwxr-x 4 root admin 16384 Jan 1 1970 usbmemory

UN65HSXXM01000535 admin@UV4:/mnt/data/hmi/qthmi/deploy$ ls -al
........
drwxr-sr-x 4 root data 4096 Mar 16 2021 workspace

```

With FileZilla I can get into the sdcard folder to updload, delete, rename.

 ![advanced-ftp-filezilla](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/c/fcd86a4cbb80bd025a12257036f315fbf9c2456c.png)

---

<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:** [26 February 2022 09:29 UTC](https://discourse.nodered.org/t/node-red-contrib-advanced-ftp-access-rights-problem/58968/4 "2022-02-26T09:29:19Z")

</div>

What does root directory LIST show you for workspace?

Does the list safe for /sdcard show anything?

---

<div class="post-metadata">

**Author:** ![struland](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/struland/32/58587_2.png) [@struland](https://discourse.nodered.org/u/struland)\
**Post date:** [26 February 2022 14:40 UTC](https://discourse.nodered.org/t/node-red-contrib-advanced-ftp-access-rights-problem/58968/5 "2022-02-26T14:40:30Z")

</div>

This is LIST SAFE with the root directory.

 ![advanced-ftp-list-safe](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/8/e85a04bf0092c945874db875e99ba1af063f1a62.png)

The difference is the group.  
workspace has 20001  
sdcard has 10000

Under rights there is a **"r"** for everyone. So to my understanding, ftp should be able to read the **"/sdcard"** directory.

But it does not. 😵‍💫

---

<div class="post-metadata">

**Author:** ![struland](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/struland/32/58587_2.png) [@struland](https://discourse.nodered.org/u/struland)\
**Post date:** [26 February 2022 14:53 UTC](https://discourse.nodered.org/t/node-red-contrib-advanced-ftp-access-rights-problem/58968/6 "2022-02-26T14:53:04Z")

</div>

Fortunatly I can get the file I wanted in the first place.

So when I inject:

```auto
msg.filename = /sdcard/IoT_init.json
msg.localFilename = /home/pi/IoT_init.json

```

that returns

```auto
"GET operation successful. /home/pi/IoT_init.json"

```

So I am happy. 😇

I do not need the list feature in my workflow, anyway.

---

<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:** [27 April 2022 14:53 UTC](https://discourse.nodered.org/t/node-red-contrib-advanced-ftp-access-rights-problem/58968/7 "2022-04-27T14:53:53Z")

</div>

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