-
Notifications
You must be signed in to change notification settings - Fork 266
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
Offline command to correct all permissions at once #1921
Comments
@sachayves only sensitive files and folder are protected, database files do not contain sensitive information. Here is a full list of all sensitive files in
Also we have password files, which will be deprecated soon.
After some investigation i think more checks should be added (right now permissions on this folders are not checked):
Now i think it's pointless to discuss why these checks are needed, but i dont have strong opinion on Now about why check is so strict and do not allow
My proposal is to add |
Besides what @cheatfate already listed, I would also suggest the following additional check:
The idea of having a single One general question that we should answer in our design guidelines is how to deliver such error messages to the user. We've tried to use the logging framework for this in the expectation that many users will be processing their logs with solutions such as LogStash and Splunkd that should capture the entire output of the program, but there is some genuine concern that the log format is not the best media to explain a complex issue such as the one discussed here. This was also brought up during the audit (e.g. #1692) |
@zah i think your |
Right, sorry for missing that. |
Thanks for taking the time to clarify @cheatfate !
I'm leaning towards this solution too. it's clean, and avoids the concerns raised around #1922. |
any maintenance / lint command should probably have a read-only mode that's default, and a fix-it mode that tries to fix the issues - the latter is important because if we had a good, automatic fix that works in all situations, we wouldn't be putting it in a separate maintenance command - ie this command sounds garbage-bin for anything that we're not sure how to handle automatically and want the users input - "my permissions are wrong" and "my database could use a pruning" don't have much in common really, beyond that. |
@arnetheduck this command could perform upgrades, for example there should be no such situation when you changing database schema and everybody should start syncing from scratch with a new build, and because very soon we will be forced to upgrade our database engine and/or our file storage engine we will need such tool to keep upgrades painless. |
Is your feature request related to a problem? Please describe.
If one upgrades from an older install of nimbus, some permissions are not set correctly. This concerns both the
secrets
andvalidators
folders (as well as the database?). As it stands, when the user tries to run the beacon node she is presented with error messages of the formEven though permissions are set correctly on new installs, forcing existing users to manually modify permissions in order to get the software working is not great from a UX perspective.
Describe the solution you'd like
An offline command, similar to Dustin's
ncli_db pruneDatabase
, that corrects all permissions at once. The error messages should reference this command.Describe alternatives you've considered
Automatically checking and setting the correct permissions when upgrading. I'm open to other suggestions. @cheatfate in particular had some great thoughts yesterday.
The text was updated successfully, but these errors were encountered: