Adding the --user to existing node not working

So I noticed that the docker run command for linux was updated to include the – user line:
–user $(id -u):$(id -g) \

I tried to add that line to my existing linux node and the node would not start back up. Docker started it but no port activity (showed closed) and no dashboard.
I tried a couple different times for spelling, syntax, etc issues and it would not start back up.
I removed the line and the node started just fine.

This node has been running for 3 years so first, do I need to add this line? Second, have things changed with the identity process so that a 3 year old node wouldn’t have the user ID info needed?
If you want logs please send me the command to type.

This is related to security. If you have used a sudo docker run... command, then all data belongs to root, not your user and group from the host.
So, you have two options:

  1. remove --user $(id -u):$(id -g) from docker run command
  2. change the owner to your user and your group

Perhaps to do not break things it’s simpler to do p.1

Thanks for clarity. I won’t try to add it as you didn’t make any indication that it is required.
In that note, I don’t use sudo and the storj user should have full access and was the user I was using. So not sure what the issue was.

It’s a permissions issue. You can see it, if you execute this command for your data location (replace /mnt/storj/storagenode/ to your actual data location):

ls -l /mnt/storj/storagenode/storage/

and in the docker container:

docker exec -it storagenode ls -l /app/config/storage/

To make it clear you can see the user and group in a numeric form:

ls -n /mnt/storj/storagenode/storage/

and in the docker container:

docker exec -it storagenode ls -n /app/config/storage/

When you use --user $(id -u):$(id -g) it starts to use your user and group in the container (not default docker user and group), so owner will differ, as result - permissions issues.