-
-
Notifications
You must be signed in to change notification settings - Fork 2k
fix: DMS state volume must ensure o+x
permission
#4420
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
Conversation
# Parent directories must have executable bit set to descend the file tree for access, | ||
# as each service running as a non-root user requires this to access their state directory, | ||
# `/var/mail-state` must allow all users `+x`: | ||
chmod o+x "${DMS_STATE_DIR}" |
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.
Wondering if this should be ugo+x
?
chmod o+x "${DMS_STATE_DIR}" | |
chmod ugo+x "${DMS_STATE_DIR}" |
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.
So ugo+x is just like chmod +x
and I think should fine because the permissions inside /var/mail-state is still open than this
drwxr-x--x 8 amavis amavis 4096 Mar 18 04:36 lib-amavis
drwxr-xr-x 2 docker docker 4096 Mar 18 04:56 lib-dovecot
drwxr-xr-x 2 root root 4096 Dec 14 2022 lib-logrotate
drwxr-xr-x 2 postfix postfix 4096 Mar 17 22:09 lib-postfix
drwxr-xr-x 20 docker docker 4096 Mar 17 22:00 qa.auto1.team
drwxr-xr-x 16 root root 4096 Mar 18 04:56 spool-postfix
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 too think +x
should be fine as it's the same as ugo+x
.
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.
as it's the same as
ugo+x
TIL chmod +w example
(only u) and chmod +x example
(ugo) behave differently 👀
chmod o+x "${DMS_STATE_DIR}" | |
chmod +x "${DMS_STATE_DIR}" |
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.
TIL chmod +w example (only u) and chmod +x example (ugo) behave differently 👀
I didn't know that either 🤯
Description
While we expect the volume to have
755
as the default for/var/mail-state
, some storage services will differ with their default permissions.Service users that need to access their state directory cannot do so when a parent directory has
root
ownership only and lacks the executable bit for theother
permission set. This is the source of numerous bug reports in the past that was non-obvious to me for how to resolve due to the errors logged 😓 (big thanks to @rixwan-sharif for identifying the correct fix)More details: #4419 (comment)
Fixes #4419
Type of change
Checklist
CHANGELOG.md