Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

polarathene
Copy link
Member

@polarathene polarathene commented Mar 17, 2025

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 the other 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

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • I have added information about changes made in this PR to CHANGELOG.md

@polarathene polarathene added this to the v15.0.1 milestone Mar 17, 2025
@polarathene polarathene self-assigned this Mar 17, 2025
# 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}"
Copy link
Member Author

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?

Suggested change
chmod o+x "${DMS_STATE_DIR}"
chmod ugo+x "${DMS_STATE_DIR}"

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

Copy link
Member

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.

Copy link
Member Author

@polarathene polarathene Mar 18, 2025

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 👀

Suggested change
chmod o+x "${DMS_STATE_DIR}"
chmod +x "${DMS_STATE_DIR}"

Copy link
Member

@casperklein casperklein Mar 18, 2025

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 🤯

@georglauterbach georglauterbach merged commit a3571a8 into master Mar 18, 2025
7 checks passed
@georglauterbach georglauterbach deleted the fix/chmod-dms-state-vol branch March 18, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'INBOX': Timeout (180s) while waiting for lock for transaction log file

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.