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
Ensure that directory permissions are properly set on MySQL and MariaDB #5401
Ensure that directory permissions are properly set on MySQL and MariaDB #5401
Conversation
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.
thanks for your contribution @driverpt ! Can you please run ./gradlew spotlessApply
? and please add tests for MariaDB too.
@@ -67,7 +68,8 @@ protected void configure() { | |||
optionallyMapResourceParameterAsVolume( | |||
MY_CNF_CONFIG_OVERRIDE_PARAM_NAME, | |||
"/etc/mysql/conf.d", | |||
"mariadb-default-conf" | |||
"mariadb-default-conf", | |||
Transferable.DEFAULT_FILE_MODE |
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.
I think this should be Transferable.DEFAULT_DIR_MODE
, right?
@driverpt are you able to finish this (soon)? If not I'll try and come up with a superseding PR. |
Hi. Please proceed. I can only pick this up next week |
Hi @driverpt! I haven't been able to work on this so far. Please leave a message when you have picked it up again so that we don't work on it in parallel. Thanks! |
Hey @famod , please feel free to pick this up. I'm a bit swamped with work atm. |
FYI, I have started working on this. The tests need some work though. |
That was where I had a hard time. To reproduce you need a Linux Operating system with 027 of default umask. I've tried doing that using docker-in-docker, but it's tricky |
Actually, I don't think it's that complicated (unless I'm missing something): Edit: That test is obviously not exactly the same as an all-readable file + umask 0027, but I think it's a reasonable and sufficient approximation. YMMV! |
Superseded by #6625, finally 😅 |
Close it favor of #6625 |
Fixes #914 #4952
Forces Directory/File to have the
Others
permission set (755 for Dir, 644 for Files), to avoidumask
issues