Install the app
How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

Does security block access of writing CSV tekst to my NAS? Or is there something else wrong?

2
2
NAS
DS220+ (DSM 6.2.4-25556)
Operating system
  1. Windows
I’m working on storing time-series data as CSV files on a Synology NAS.

The data is generated by a service running inside Docker (e.g. Node-RED), and I’m trying to write this data to a shared folder on the NAS.

Current setup:

  • Synology NAS running DSM
  • Docker container (Node-RED or similar)
  • Volume mapping to a shared folder, for example:
    /volume1/docker/nodered/data/
What works:

  • The container runs correctly
  • The service processes data without issues
What doesn’t work:

  • Writing to files (CSV) fails due to permission errors
  • The container either cannot create files or cannot append to existing ones
What I suspect:

  • File system permissions / ownership mismatch
  • Container user not matching Synology user/group
  • Possibly missing or incorrect PUID/PGID configuration
Questions:

  1. What is the recommended way to configure write permissions for Docker containers on Synology?
  2. Should I align container user IDs with NAS users (PUID/PGID)?
  3. Is it better to manage permissions via DSM (shared folder settings) or via Docker config?
  4. Are there known best practices for writing log/data files (like CSV) from containers?
I’m not looking for application-specific advice, but rather the correct NAS/Docker permission model to make this reliable.

Thanks in advance.

FTMZ
 
Welcome to the forum.

Should I align container user IDs with NAS users (PUID/PGID)?
That would be the case in order to get the permissions going. Depending on the actual container you are running and its parameters it will depend how best to configure it.

Would you be willing to share the name of the exact image you are using?

Are there known best practices for writing log/data files (like CSV) from containers?
Once you have the permissions (r/w) going, there won't be any differences in regards to using container setup vs. baremetal one.
 
Thank you for your answer.
I've been buisy and I did not have the opportunity to reply erlier.

I'm not familiair with the NAS or the settings and I got my assistance from ChatGPT.

The image I am using is:

The latest of nodered/node-red

Running on a Synology NAS using Docker (DSM).

Current setup:
  • Mosquitto container (working fine)
  • Node-RED container (receives MQTT data correctly)
  • Volume mapping:
nodered-logs → /logs

Inside Node-RED I try to write to:
/logs/metingen.txt

Writing to a temporairy map (/tmp) works fine, but writing to /logs results in:

EACCES: permission denied

I also tested inside the container:
touch /logs/test.txt

Which also returns:
Permission denied

So it seems clearly a permission issue between the container user and the NAS filesystem.

I have not yet configured PUID/PGID explicitly. I would not know how to.

What would be the recommended way to determine the correct UID/GID on Synology and apply that to this container?

Also, is the nodered/node-red image expected to support PUID/PGID directly, or is another approach required for this specific image?

Kind regards,
FTMZ
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Popular tags from this forum

Similar threads

Any available port. For example, should you change the port 5001 to 8647, then you will need to change the...
Replies
5
Views
179

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending content in this forum

Back
Top