Permission error Copying or Writing to a file in Fileshare remote folder

This could be a really simple thing I am missing,

I am trying to write to a file or copy a file to a remote file share location. I get a permission error when I try to do so. I am not sure what I should be giving permission to allow node-red to write to a shared folder. This is a windows machine.

Thanks in Advance.

which node are you using? Have you checked the info panel / readme for the node to see if it can do what you are trying to do?

@ukmoose I am using the file-in node. Just to make it clear, I can use it to read and write from and into a file completely okay if it is a local file. However, I am not able to write to a file (create if does not exist) on a remote location.

I did go through the info panel. no help. I believe it has to do more with node-red having access to the shared folder location.

I have the same problem if I am using the node-red-contrib-fs-ops node. Do not have permissions. I am running node-red as a service on a windows machine.

Any idea what file permissions can be given to this remote sharefolder?

Thanks.

Pretty sure that can only handle local files.
But there are https://flows.nodered.org/?term=smb&num_pages=1 nodes that should allow you to do what you want

Will try to work with these nodes. Thank you! Will give you an update after I try this.

Thanks.

node-red-contrib-smb says I am passing the wrong a wrong parameter. Still working on understanding it.

however node-red-contrib-filebrowser is unable to install, gives me this log.

2019-07-31T21:21:10.609Z Install : node-red-contrib-filebrowser 0.0.25

2019-07-31T21:21:10.624Z npm.cmd install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-filebrowser@0.0.25
2019-07-31T21:21:14.653Z [err] npm 
2019-07-31T21:21:14.654Z [err] ERR! code ENOGIT
2019-07-31T21:21:14.654Z [err] npm ERR! Error while executing:
2019-07-31T21:21:14.654Z [err] npm ERR! undefined ls-remote -h -t https://github.com/SCISYS-MS/node-ftps.git
2019-07-31T21:21:14.654Z [err] npm ERR!
2019-07-31T21:21:14.654Z [err]  
2019-07-31T21:21:14.654Z [err] npm ERR!
2019-07-31T21:21:14.654Z [err]  undefined
2019-07-31T21:21:14.654Z [err] npm 
2019-07-31T21:21:14.654Z [err] ERR! No git binary found in $PATH
2019-07-31T21:21:14.655Z [err] npm ERR! 
2019-07-31T21:21:14.655Z [err] npm
2019-07-31T21:21:14.655Z [err]  ERR! Failed using git.
2019-07-31T21:21:14.655Z [err] npm ERR!
2019-07-31T21:21:14.655Z [err]  Please check if you have git installed and in your PATH.
2019-07-31T21:21:14.675Z [err] 
2019-07-31T21:21:14.675Z [err] npm ERR! A complete log of this run can be found in:
2019-07-31T21:21:14.675Z [err] npm ERR!     C:\Users\test\AppData\Roaming\npm-cache\_logs\2019-07-31T21_21_14_656Z-debug.log
2019-07-31T21:21:14.695Z rc=1```

Any idea what could be wrong?

Thanks,
Kevin.

Pretty clear error:

Please check if you have git installed and in your PATH.

Are both of the machine Windows ?? What version of WIndows is it ?

Craig

@craigcurtin Yes, both are windows machines. Windows server 2016.

I imagine Node-Red would be inheriting the permission of the service it is running as. Based on the fact that you have not stated these machines are in a Domain i would therefore assume they are standalone servers. I have not looked at the SMB node - are you able to give it permissions ? (i.e. user credentials) for the remote machine ?

Also have you checked that filesharing is enabled on the machine that you wish to create the file on - and also what firewall is in place and if it allows connections.

An easy test of some of this is to go to the command line as an administrator and type

Net use * \\Remote Machine Name\c$ /user:administrator and provide the admin password (for the remote machine) when requested

If this works you then know that

  1. Filesharing is enabled
  2. the firewall is allowing SMB packets through on both machines

Craig

I had a similar problem, attached link to the solution I got :

I used the execute node to solve it

It is on a domain, I have checked the fileshare permissions already. I see Nxito has an interesting approach to this. I'm going to try that and give an update.

I went through the thread. I have the exactly the same problem, same error message. Will try the Net Use command and give you an update.

Thanks.

OK if this is on a domain then do the net use command i gave you - if that works as administrator from the command line all good.

Then once you have done that do the same command again but substitute the c$ with the actual name of the share that you have create and see if that also connects with a new drive letter and confirm you can read and write to it

Once that is done you need to delete those map drives (this is important) net use (drive letter) /d - so for example

Net use t: /d

and then try and do the same commands to access the share agan but substitute the username that is being used to start node red (how are you starting Node-red - pm2 ?? or some other manager ?)

If all of that works and you can read and write to the drive, you then need to delete the drive letter again and once again do the net use command to access this drive - but this time on the end enter

/persistent:yes - which will surive reboots

Then try it via node-red

Craig