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

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

If I try it with workingDir = /sdcard the message is "Error: No such file or directory."
advanced-ftp-list-sdcard-fail

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

The command "LIST" on the root directory shows me, that there is a directory named sdcard.
advanced-ftp-list-sdcard

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?

[
    {
        "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": ""
    }
]

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

This is what I get with ls -al

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.

What does root directory LIST show you for workspace?

Does the list safe for /sdcard show anything?

This is LIST SAFE with the root directory.

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. :face_with_spiral_eyes:

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

So when I inject:

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

that returns

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

So I am happy. :innocent:

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

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