-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
pkg: file stat warning #12242
pkg: file stat warning #12242
Conversation
Documentation/op-guide/security.md
Outdated
@@ -431,6 +431,9 @@ No. etcd doesn't encrypt key/value data stored on disk drives. If a user need to | |||
* Let client applications encrypt and decrypt the data | |||
* Use a feature of underlying storage systems for encrypting stored data like [dm-crypt] | |||
|
|||
### I’m seeing a log warning that "directory X exist without desired file permission -rwx------" | |||
When etcd create certain new directories it sets file permission to 700 to prevent unprivileged access as possible. However, if user has already created a directory with own preference, different than 700, etcd uses the existing directory and logs the warning message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jingyih we can doc it differently or modify the warning below per review comments. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This makes a lot of sense thanks for making the change @spzala |
if lg == nil { | ||
lg = zap.NewExample() | ||
} | ||
lg.Warn("check file permission", zap.Error(err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this warning more specific? Dir xxx already exist, but the permission is xxx. The recommend permission is xxx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiang90 Yup, that makes sense. Changing it, so it will be like "directory "default.etcd" exist, but the permission is "drwxrwxrwx". The recommended permission is "-rwx------" to prevent possible unprivileged access to the data."
Provide warning and doc instead of enforcing file permission.
f3a0ed1
to
c2ebbfd
Compare
lgtm |
…-upstream-release-3.4 Automated cherry pick of #12242
…-upstream-release-3.3 Automated cherry pick of #12242
Provide warning and doc instead of enforcing file permission.