MOACChain/FileStorm

scsserver-linux-amd64 does not respect path from configuration file.

Opened this issue · 3 comments

I am tryign to dockernize filestorm so that it can be run from NAS device.
Current latest version 2.0 https://github.com/MOACChain/FileStorm/releases/tag/2.0

scsserver-linux-amd64 cannot be started in docker container with non-root privilege.
After further investigation, it turns out scsserver-linux-amd64 was trying to write files in the root directory.

  • /private.pem
  • /public.pem
  • /scskeystore/

Those files are out of /data/scs directory which is configured in userconfig.json

{
   //....
    "DataDir" : "/data/scs"
   //...
}

However, scsserver-linux-amd64 does not respect that. And encountered permission error on start.

A temporary solution is to add the following line into Dockerfile so that the working directory is fixed to /data/scs.

WORKDIR /data/scs

It seems scsserver-linux-amd64 is trying to write files in working directory instead of configured path.

DataDir folder is only used to store block information. Folders will be add to this directory after filestorm scs has been successfully added to filestorm blockchain. The 3 files and folder you mentioned are designed to be created under root folder.

The 3 files and folder you mentioned are designed to be created under root folder.

After specifying WORKDIR /data/scs, they are now created in /data/scs directory and scsserver-linux-amd64 can be started with non-root privilege.

I'm glad you've made it work! Thanks for sharing this with us.