Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to open master .. masterseed.json.. has insecure file permissions #20123

Closed
gpersoon opened this issue Sep 24, 2019 · 6 comments · Fixed by #22251
Closed

Failed to open master .. masterseed.json.. has insecure file permissions #20123

gpersoon opened this issue Sep 24, 2019 · 6 comments · Fixed by #22251
Assignees

Comments

@gpersoon
Copy link

System information

geth version
Geth
Version: 1.9.5-stable
Git Commit: a1c09b93871dd3770adffb177086abda1b2ff3af
Git Commit Date: 20190920
Architecture: amd64
Protocol Versions: [63]
Network Id: 1
Go Version: go1.13
Operating System: windows
GOPATH=C:\Users\...\go
GOROOT=C:\Go\
clef -v
Clef version 0.0.0

Expected behaviour

Clef can use masterseed.json on windows

Actual behaviour

When starting clef.exe on windows the following error is shown:

WARN [09-24|17:00:39.980] Failed to open master, rules disabled    
err="file (C:\\Users\\...\\AppData\\Roaming\\Signer\\masterseed.json) 
has insecure file permissions (-rw-rw-rw-)"

When masterseed.json is made read only, the message changes to:

WARN [09-24|17:06:55.978] Failed to open master, rules disabled    
err="file (C:\\Users\\...\\AppData\\Roaming\\Signer\\masterseed.json) 
has insecure file permissions (-r--r--r--)"

However there is no way to get to the required security of the file, even changing or deleting all the windows rights doesn't help.

Steps to reproduce the behaviour

On windows: do clef init and then start clef

@ligi
Copy link
Member

ligi commented Sep 25, 2019

can't you give read permissions to just the user on windows?

@gpersoon
Copy link
Author

You can adjust the permissions using the "windows" way, however the linux way to query the access rights gives different results. I've tried setting the access rights in multiple ways, but clef wasn't happy with any of them.

@sunilkumarsistla
Copy link

chmod 400 <filepath> helped me to get rid of the prompt
but i'm not sure how to use/ prepare the signersecret value file path and the contents inside file

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@ralph-pichler
Copy link

this issue still exists in the latest version of clef. has anyone been able to set permissions correctly?

@lmj0011
Copy link

lmj0011 commented Jan 30, 2021

@ralph-pichler

If you're on Windows this PR is suppose to fix the issue, but if you're on Unix/Linux the permission is 0400

so you can run chmod on the masterseed.json from the command line (Linux):

~$ chmod 400 /home/user/.clef/masterseed.json 

then verify the permissions are correct:

~$ ls -al /home/user/.clef/masterseed.json 
-r-------- 1 user user 868 Jan 26 22:58 masterseed.json

worth noting that permissions for the masterseed.json or any file will probably get changed when moving it to different location on your computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants