Docker permissions

#1

Dear experts,
I run the dockerized version of node-red in a lubuntu 18.04LTS. In order to have storage persistance i run it the container as:
$ sudo docker run -it -p 1880:1880 -v /home/bsense/docker-persistent/nodered/data:/data --name mynodered nodered/node-red-docker

I have previously copied the container data files to the host directory:
$ sudo docker cp mynodered:/data /home/bsense/docker-persistent/nodered/

It starts coorectly but when i try to save the flows it gives an error of EACCESS
{Deploy failed: {“error”:“EACCES”,“message”:“EACCES: permission denied, rename ‘/data/flows.json’ -> ‘/data/.flows.json.backup’”}

I would like to keep the host to managet he directory so I do not see any chown.

Within the container the uid is 1001 (nodered) the host user is 1000 (bsense)

This is kind annoying. It is not happenning to me with other conatinerized apps (mariadb, mongodb)

What could I do?

Regards