Contrib-smb writing fails

Hi there,

I have an issue with the node-red-contrib-smb node.
I am using the following setup:
Debian 10
node-red v1.2.9, node-red-contrib-smb v1.2.0
installed the smbclient cifs-utils package.

So what's the problem:
I can read directories with the smb nodes, but if I am trying to write/create a new file, I am getting the error: STATUS_ACCESS_DENIED (0xC0000022)

First expectation would be that I don't have the writing permission, but I do. Additionally, if I am copying a file with the smb package in the console it works (smbclient '\server\path' -U username).

So reading works within the node. Writing works only if using the smb client in the terminal. Any ideas?
Any more details required?

Thanks in advance! Looking for a solution for 3 days now :frowning:
BR

How are you running Node-RED ? If you are running it as a service on boot hen it may not have the same permissions as your command line user.

Hi, yes, node red runs as a service. Is the error related to the share access or to a local permission? For the share access, the local user should be irrelevant, am I right?

Hi again,

I think your assumptions is right. I changed the permission of the smb package to chmod 777, but that didn't help.
Do you have any idea how to solve it?

Error: STATUS_ACCESS_DENIED (0xC0000022) : {Access Denied} A process has requested access to an object but has not been granted those access rights.
    at SMB2Forge.request (/home/root/.node-red/node_modules/@marsaud/smb2/lib/tools/smb2-forge.js:22:15)
    at createFile (/home/root/.node-red/node_modules/@marsaud/smb2/lib/api/writeFile.js:38:5)
    at module.exports.writeFile (/home/root/.node-red/node_modules/@marsaud/smb2/lib/api/writeFile.js:140:3)
    at /home/root/.node-red/node_modules/@marsaud/smb2/lib/tools/smb2-connection.js:52:21
    at /home/root/.node-red/node_modules/@marsaud/smb2/lib/tools/smb2-connection.js:153:8
    at /home/root/.node-red/node_modules/@marsaud/smb2/lib/tools/smb2-connection.js:122:25
    at Object.<anonymous> (/home/root/.node-red/node_modules/@marsaud/smb2/lib/tools/message.js:15:15)
    at Socket.<anonymous> (/home/root/.node-red/node_modules/@marsaud/smb2/lib/tools/smb2-forge.js:71:31)
    at Socket.emit (events.js:198:13)
    at addChunk (_stream_...

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