Error starting kmd (kmd data dir not secure)

Executing the command

$ goal kmd start -t 3600

the following error is returned:

    ERRO[0000] [Stack] goroutine 1 [running]:
    runtime/debug.Stack(0xc000212070, 0xc000214000, 0xc00016aa10)
            runtime/debug/stack.go:24 +0x9f
    github.com/algorand/go-algorand/logging.logger.Errorf(0xc000212070, 0xc000214000, 0x116f7c6, 0x32, 0xc000118de0, 0x2, 0x2)
            github.com/algorand/go-algorand/logging/log.go:229 +0x4a
    github.com/algorand/go-algorand/nodecontrol.(*KMDController).StartKMD(0xc00039fc28, 0xe10, 0x0, 0x0, 0x0)
            github.com/algorand/go-algorand/nodecontrol/kmdControl.go:195 +0xa8a
    main.startKMDForDataDir(0xc00003a070, 0x5, 0xc00003804e, 0x9, 0xc00013ea20, 0x12)
            github.com/algorand/go-algorand/cmd/goal/kmd.go:51 +0x156
    main.glob..func64.1(0xc00003804e, 0x9)
            github.com/algorand/go-algorand/cmd/goal/kmd.go:74 +0x8d
    main.onDataDirs(0xc00039fd48)
            github.com/algorand/go-algorand/cmd/goal/commands.go:334 +0x84
    main.glob..func64(0x204e480, 0xc000118d40, 0x0, 0x2)
            github.com/algorand/go-algorand/cmd/goal/kmd.go:72 +0x71
    github.com/spf13/cobra.(*Command).execute(0x204e480, 0xc000118d00, 0x2, 0x2, 0x204e480, 0xc000118d00)
            github.com/spf13/cobra@v0.0.3/command.go:766 +0x29f
    github.com/spf13/cobra.(*Command).ExecuteC(0x204b2a0, 0x0, 0x118f05c, 0xc3)
            github.com/spf13/cobra@v0.0.3/command.go:852 +0x2ec
    github.com/spf13/cobra.(*Command).Execute(...)
            github.com/spf13/cobra@v0.0.3/command.go:800
    main.main()
            github.com/algorand/go-algorand/cmd/goal/commands.go:155 +0x98  file=kmdControl.go function="github.com/algorand/go-algorand/nodecontrol.(*KMDController).StartKMD" line=195
    ERRO[0000] /opt/data/kmd-v0.5: kmd data dir exists but is too permissive (755)  file=kmdControl.go function="github.com/algorand/go-algorand/nodecontrol.(*KMDController).StartKMD" line=195
    Failed to start kmd: kmd data dir not secure

Does anyone know how to solve this problem?

How did you create the data dir. It looks like the wrong permissions on the directory.

1 Like

I didn’t create any dir, I just ran the command described above.

What install did you use from this page? https://developer.algorand.org/docs/run-a-node/setup/install/

If you are using the non deb/rpm installs you have to make sure your data directory is either set in env variable or you specify the data directory when you start: goal kmd start -t 3600 -d data

I’m actually using sandbox to run a
node

kmd on sanbox should start automtically. Run ./sandbox test and you should see:

Test KMD REST API…
~$ curl localhost:4002/v1/wallets -H “X-KMD-API-Token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa”
{}

1 Like

yes you’re right, I was a little confused. Thank you I appreciate your help.

No problem. Glad it’s working for you.

i’m getting this error on windows. file too permissive it says and Failed to start kmd: kmd data dir not secure