Skip to content

feat(registry): filesystem native-parity — stat mode bits, chmod, access#268

Merged
NathanFlurry merged 1 commit into
mainfrom
stack/feat-registry-filesystem-native-parity-stat-mode-bits-chmod-access-ozpppswp
Jul 4, 2026
Merged

feat(registry): filesystem native-parity — stat mode bits, chmod, access#268
NathanFlurry merged 1 commit into
mainfrom
stack/feat-registry-filesystem-native-parity-stat-mode-bits-chmod-access-ozpppswp

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Teach the VM's filesystem layer POSIX permission semantics so native C tools
(vim, coreutils) behave like Linux:

  • wasi-libc patch exposes host permission bits through new host_fs.fd_mode /
    path_mode imports so stat/fstat/lstat return real mode bits (0644/0755)
  • chmod/fchmod implemented via the host_fs bridge (previously ENOSYS)
  • access() reflects the mode's rwx bits (X_OK no longer always succeeds)
  • truncate/ftruncate update the size stat reports; fd metadata stays coherent
  • fixes an intermittent EFAULT on create/write under wasm heap growth
    This fixes vim opening every file readonly and 'touch: Bad address', with a
    comprehensive fs_probe.c that is diffed 1:1 against native Linux.

@NathanFlurry

Copy link
Copy Markdown
Member Author

Stack for rivet-dev/secure-exec

Get stack: forklift get 268
Push local edits: forklift submit
Merge when ready: forklift merge 268

@railway-app

railway-app Bot commented Jul 4, 2026

Copy link
Copy Markdown

🚅 Environment secure-exec-pr-268 in rivet-frontend has no services deployed.


🚅 Deployed to the secure-exec-pr-268 environment in secure-exec

Service Status Web Updated (UTC)
secure-exec 😴 Sleeping (View Logs) Web Jul 4, 2026 at 5:50 pm

Teach the VM's filesystem layer POSIX permission semantics so native C tools
(vim, coreutils) behave like Linux:
- wasi-libc patch exposes host permission bits through new host_fs.fd_mode /
  path_mode imports so stat/fstat/lstat return real mode bits (0644/0755)
- chmod/fchmod implemented via the host_fs bridge (previously ENOSYS)
- access() reflects the mode's rwx bits (X_OK no longer always succeeds)
- truncate/ftruncate update the size stat reports; fd metadata stays coherent
- fixes an intermittent EFAULT on create/write under wasm heap growth
This fixes vim opening every file readonly and 'touch: Bad address', with a
comprehensive fs_probe.c that is diffed 1:1 against native Linux.
@NathanFlurry NathanFlurry force-pushed the stack/feat-registry-filesystem-native-parity-stat-mode-bits-chmod-access-ozpppswp branch from 3fdd7fb to b18da94 Compare July 4, 2026 19:23
@railway-app railway-app Bot temporarily deployed to secure-exec / secure-exec-pr-268 July 4, 2026 19:24 Destroyed
@NathanFlurry NathanFlurry merged commit b18da94 into main Jul 4, 2026
3 of 5 checks passed
@NathanFlurry NathanFlurry deleted the stack/feat-registry-filesystem-native-parity-stat-mode-bits-chmod-access-ozpppswp branch July 4, 2026 19:27
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