Skip to content

fix(fs): Handle Snap mount lookup failures in ensureDir#1073

Merged
leumor merged 1 commit intorelease/2from
bugfix/snap-posix-perms-mountpoint
Feb 22, 2026
Merged

fix(fs): Handle Snap mount lookup failures in ensureDir#1073
leumor merged 1 commit intorelease/2from
bugfix/snap-posix-perms-mountpoint

Conversation

@leumor
Copy link
Collaborator

@leumor leumor commented Feb 22, 2026

Summary

  • remove the Files.getFileStore(path) probe from Dirs.ensureDir, which can throw Mount point not found under Snap mount namespaces
  • set POSIX permissions directly via Files.setPosixFilePermissions and keep permission failures non-fatal
  • treat unsupported POSIX attributes as a debug-level skip
  • add tests covering IOException and UnsupportedOperationException during permission setting

How to test

  • run ./gradlew test --tests *DirsTest
  • run the node in an Ubuntu Snap container and verify startup no longer logs the Mount point not found warning from network.crypta.fs.Dirs

Notes

  • base branch for this PR is release/2 (requested current branch)
  • behavior remains best-effort for filesystem permissions and startup is unchanged aside from eliminating the FileStore lookup failure path

@sonarqubecloud
Copy link

@leumor leumor merged commit 6bee0a4 into release/2 Feb 22, 2026
4 checks passed
@leumor leumor deleted the bugfix/snap-posix-perms-mountpoint branch February 22, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant