# Access synology NAS from node-red

**URL:** <https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043>\
**Category:** General\
**Created:** [30 January 2021 11:37 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043 "2021-01-30T11:37:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [30 January 2021 11:37 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/1 "2021-01-30T11:37:50Z")

</div>

I am new to linux Mint 20 and still learning.

I want to load a file from my Synology NAS. I get this error:

```auto
[{"id":"a2ebd710.f21f18","type":"inject","z":"12ca0c96.d3b703","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":320,"wires":[["e68c1f02.7765c"]]},{"id":"e68c1f02.7765c","type":"file in","z":"12ca0c96.d3b703","name":"NAS","filename":"afp://hannes@JU-NAS.local/share/Raspi/49-Monitor/aussentemp/02-2021-Aussentemp.txt","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":370,"y":320,"wires":[["7d97e21d.1d352c","6f705256.c0003c"]]},{"id":"6f705256.c0003c","type":"switch","z":"12ca0c96.d3b703","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":530,"y":320,"wires":[["1caaef2b.912241"]]},{"id":"1caaef2b.912241","type":"json","z":"12ca0c96.d3b703","name":"","property":"payload","action":"","pretty":false,"x":690,"y":320,"wires":[["6a2d6c16.b675d4"]]},{"id":"7d97e21d.1d352c","type":"debug","z":"12ca0c96.d3b703","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":370,"y":260,"wires":[]},{"id":"6a2d6c16.b675d4","type":"debug","z":"12ca0c96.d3b703","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"filename","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":260,"wires":[]}]

```

"Error: ENOENT: no such file or directory, open 'afp://hannes@JU-NAS.local/share/Raspi/49-Monitor/aussentemp/02-2021-Aussentemp.txt'"

I used the path shown in my file properties.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/d/adc8520be7600eacfe3cd7ec5b44af6196ae94f9.png)

the file has read and write access rights.

could this be a owner problem?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 January 2021 11:51 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/2 "2021-01-30T11:51:45Z")

</div>

Outside of node-red, can linux mint box actually access `afp://hannes@JU-NAS.local/share/Raspi/49-Monitor/aussentemp/02-2021-Aussentemp.txt` ?

Maybe try without specifying the protocol?  
`//hannes@JU-NAS.local/share/Raspi/49-Monitor/aussentemp/02-2021-Aussentemp.txt`

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [30 January 2021 12:02 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/3 "2021-01-30T12:02:47Z")

</div>

> [@Steve-Mcl](#):
>
> afp:

AFP is the Apple Filing Protocol (what was AppleTalk). So unless you have set that up on your Mint box, you won't be able to access the file.

Try setting up the NAS to use a less proprietary protocol or at least the more widely supported SMB.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 January 2021 12:04 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/4 "2021-01-30T12:04:56Z")

</div>

> [@TotallyInformation](#):
>
> AFP is the Apple Filing Protocol (what was AppleTalk). So unless you have set that up on your Mint box, you won't be able to access the file.

Thats why I asked if the OP could access the file in linux mint from outside node-red (for his voyage of discovery 🙂 )

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [30 January 2021 12:50 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/5 "2021-01-30T12:50:56Z")

</div>

Hi Steve,

1. without the protocol same error.
2. yes, I can access the file with my text editor, edit it and save.

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [30 January 2021 12:57 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/6 "2021-01-30T12:57:30Z")

</div>

I get the same error with an smb NAS on a Fritzbox Router.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/6/f64ea1297faaa244c9528eacda36dadc6e046232.png)

"Error: ENOENT: no such file or directory, open 'smb://fritz-nas/fritz.nas/Samsung\_T5/Node-Red/NR Local.txt'"

I also can open the file with my text editor

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 January 2021 13:01 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/7 "2021-01-30T13:01:29Z")

</div>

When you are reading/writing the file in mint desktop text editor, is that account the same account running node-red?

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [30 January 2021 13:19 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/8 "2021-01-30T13:19:33Z")

</div>

yes, it is all under my login.  
I can read a file in my home directory with node red but not from the NAS

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 January 2021 13:39 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/9 "2021-01-30T13:39:08Z")

</div>

I thought I remembered that the file in node did not cope with samba and similar protocols, only local, and remote files mounted locally.

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [30 January 2021 13:47 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/10 "2021-01-30T13:47:36Z")

</div>

would mounting my NAS in fstab solve the problem?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [30 January 2021 13:51 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/11 "2021-01-30T13:51:09Z")

</div>

When you use your text editor I think that the file manager is managing the protocol. Node-RED is a server and needs raw filing system access.

So yes, you need to mount the remote filing system for it to work unless you use a dedicated node that internally manages the remote protocol.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [30 January 2021 13:57 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/12 "2021-01-30T13:57:13Z")

</div>

> [@Colin](#):
>
> I thought I remembered that the file in node did not cope with samba and similar protocols, only local, and remote files mounted locally.

I think you're thinking of the Watch node that doesn't like non local files.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 January 2021 14:07 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/13 "2021-01-30T14:07:09Z")

</div>

> [@knolleary](#):
>
> I think you're thinking of the Watch node

Quite possibly, so should the File node should handle smb:, sftp: etc? I have just tried it with `sftp://` and it doesn't seem to work. The same sftp url works opening the file in an editor.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [30 January 2021 14:37 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/14 "2021-01-30T14:37:24Z")

</div>

No - probably as we use the node.js file library - it says only file:/// or direct paths are supported. [File system | Node.js v15.7.0 Documentation](https://nodejs.org/api/fs.html#fs_url_object_support)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [30 January 2021 14:51 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/15 "2021-01-30T14:51:30Z")

</div>

Yes. Any locally mounted file should be accessible by the file node. Sftp is not a locally mounted file.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 January 2021 15:31 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/16 "2021-01-30T15:31:01Z")

</div>

So my memory was correct, the file node won't cope with smb and similar protocols unless they are mounted locally.

The difference with the Watch node is that it doesn't like remote files even if mounted locally.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [30 January 2021 16:20 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/17 "2021-01-30T16:20:01Z")

</div>

As I said some posts ago.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 January 2021 16:28 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/18 "2021-01-30T16:28:57Z")

</div>

Yes, after I said I thought that was the case 🙂  
My post was in reply to Nick's as earlier he said I might be thinking of the Watch node.

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [1 February 2021 11:19 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/19 "2021-02-01T11:19:08Z")

</div>

mounting fritzbox and synology using smb did the trick.  
Here what I have put into /etc/fstab:

[//10.0.0.1/fritz.nas](https://10.0.0.1/fritz.nas) /mnt/fritzbox/ cifs username=xxxx,password=yyyy,vers=1.0,auto,users,defaults,\_netdev 0 0

# 

[//10.0.0.9/share](https://10.0.0.9/share) /mnt/synology/ cifs username=xxxx,password=yyyy,vers=1.0,auto,users,defaults,\_netdev 0 0

```auto
[{"id":"a2ebd710.f21f18","type":"inject","z":"12ca0c96.d3b703","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":320,"wires":[["e68c1f02.7765c"]]},{"id":"e68c1f02.7765c","type":"file in","z":"12ca0c96.d3b703","name":"NAS","filename":"/mnt/synology/standard-temp.CSV","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":370,"y":320,"wires":[["6a2d6c16.b675d4"]]},{"id":"6a2d6c16.b675d4","type":"debug","z":"12ca0c96.d3b703","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":610,"y":320,"wires":[]},{"id":"b49358e.46b28a8","type":"file in","z":"12ca0c96.d3b703","name":"Fritz","filename":"/mnt/fritzbox/gaeste-temp.CSV","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":370,"y":440,"wires":[["28a61a3b.fa1fb6"]]},{"id":"670fd85.ca63a28","type":"inject","z":"12ca0c96.d3b703","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":440,"wires":[["b49358e.46b28a8"]]},{"id":"28a61a3b.fa1fb6","type":"debug","z":"12ca0c96.d3b703","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":440,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 February 2021 11:20 UTC](https://discourse.nodered.org/t/access-synology-nas-from-node-red/40043/20 "2021-02-15T11:20:08Z")

</div>

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