# File path question (Linux vs Windows)

**URL:** <https://discourse.nodered.org/t/file-path-question-linux-vs-windows/49702>\
**Category:** General\
**Created:** [14 August 2021 01:50 UTC](https://discourse.nodered.org/t/file-path-question-linux-vs-windows/49702 "2021-08-14T01:50:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [14 August 2021 01:50 UTC](https://discourse.nodered.org/t/file-path-question-linux-vs-windows/49702/1 "2021-08-14T01:50:07Z")

</div>

Hopefully an easy question about file paths for the bi-lingual Linux & Windows folks...

I have a flow that saves a file to a shared folder on a Synology NAS. I use the moment node (as instructed [in this post](https://discourse.nodered.org/t/msg-filename-logging-data/1117/13)) to create the file name. When running Node-RED on my Windows PC, I save to a specified Synology NAS location (which is 192.168.10.199/p-drive, followed by the subfolders and other file naming stuff. **And this flow works beautifully.**  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/9/89f29416e51d6d0edc37ae7e6d3065c20ec3e7d7.png)

I then moved this same flow to a AWS-hosted Debian box on our network, and after going thru the NFS setup, I can see the drive when I use the df command:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/b/3b66d2e80342434a62dddcaa7c2c5631617e194b.png)

But when I try to put various combinations of the file path into the Moment node (as I did on the Windows box), I cannot get it to work. Here is one combination and the error:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/7/b7e4b49e4aa5b9c03a68816a90eb11ec66105d95.png)

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

NFS permissions look fine on the Synology box (where the blacked out address is the Debian box)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/1/31469b1f32d80fdcf86a592ef266c634b60f4ddd.png)  
I am almost certain I am missing a slash or a colon or some other small thing, but maybe more on the Debian box is required in order to map to this shared folder and use that path in Node-RED.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 August 2021 07:04 UTC](https://discourse.nodered.org/t/file-path-question-linux-vs-windows/49702/2 "2021-08-14T07:04:27Z")

</div>

Try changing the `:/`at the end of the ip to just a `/`

---

<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:** [14 August 2021 07:36 UTC](https://discourse.nodered.org/t/file-path-question-linux-vs-windows/49702/3 "2021-08-14T07:36:13Z")

</div>

Looking at the image, you have mounted the path to `/mnt` (which is odd but hey ho)

Try listing `ls` in `/mnt` - do you see your p-drive files?

If yes, then use `/mnt/filename`

---

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [14 August 2021 15:54 UTC](https://discourse.nodered.org/t/file-path-question-linux-vs-windows/49702/4 "2021-08-14T15:54:22Z")

</div>

Thank you both. Got it working now. Here's how (in case others in the future want to save files to a Synology NAS)...

[These instructions](https://kb.synology.com/en-ca/DSM/tutorial/How_to_access_files_on_Synology_NAS_within_the_local_network_NFS) (towards the very end of the page) that I originally followed show in their example to mount the Synology folders as follows:

`sudo mount -t nfs 196.168.x.x:/volumeX/test /mnt`

And I blindly followed the above, which mounted the path to /mnt (which in retrospect is odd, I guess). And when I later tried to do `ls` in `/mnt`, I was getting all sorts of permission denied messages. So I then undid (unmounted) the drive from the /mnt path and once back to square one, I followed [these instructions](https://linuxhint.com/nfs-mount-synology-linux/) instead and they correctly state to do the following:

Create a directory:

`$ sudo mkdir -pv /synology-nas/Files`

Mount the shared folder "Files" in the newly created directory:

`$ sudo mount 192.168.0.110:/volume2/Files /synology-nas/Files`

and from there, I just cleaned up some of the permissions on the Synology GUI and the final path that worked was:

`/synology-nas/Files/Export/AMP`

---

<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:** [28 August 2021 15:55 UTC](https://discourse.nodered.org/t/file-path-question-linux-vs-windows/49702/5 "2021-08-28T15:55:07Z")

</div>

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