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.
@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?
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
Filesharing is enabled
the firewall is allowing SMB packets through on both machines
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