Tail node using UNC path

Hello, how can i use the tail node with a shared unc path?
im getting "File not found: \\10.0.0.174\Logs\RuleSystem.log" i already set shared permission.

That isn't a valid UNC. You need double backslash to start.

For some reason it removing the \ and changing to \ when i copy here

If you put it in back-ticks it shouldn't do that. Backslash is generally used as an escape character. That's why you have to double everything when handing back slashes in strings.

That is most likely your problem in the code.

Can you please give me an example.

Try using forward slashes or double up every backslash.

E.g...

\\\\server\\path\\file

Or

//server/path/file

No luck:(

Are you sure you have the right URI?, From the command line, can you do ls \\10.0.0.174\Logs\

Im pretty sure, its Windows Shared folder i can access the folder from my other computers.

:cough: I wonder how many times I've heard that over the years! Not getting at you, we all do it, but you really need to test from the command line on the device that runs Node-RED using the same user id - assuming you are running NR from a user.

Under Windows, if you are starting NR from the task manager, you might be using SYSTEM which will have different permissions and may not have access.

Im currently running node-red in a docker on my synology NAS. and im accessing from Homeassistant. My NVR is windows base OS that is running the logs. does Node-red have command line interface from the gui so i can test the shared path?

OK, that's a fairly complex setup.

I think someone did create an experimental terminal node but actually, you can do what you need to using the exec node. Wire one up with inject and a debug node attached to all outputs of the exec. Set the exec to ignore the input msg (so it just acts as a trigger) and set the command line to ls \\10.0.0.174\Logs\. I don't think you will need to escape the back slashes.

Im getting this am i doing something wrong?

As expected, the error is "No such file or directory". There is no path from the server running Node-RED to that shared folder. Most likely the virtual user running Node-RED inside Docker has no permissions to access that shared drive.

You may need to dust off your SAMBA command-line fu to try and connect to it.

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