Skip to content

vfs: make lchown update symlink metadata#64573

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-lchown-symlinks
Open

vfs: make lchown update symlink metadata#64573
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:vfs-lchown-symlinks

Conversation

@trivikr

@trivikr trivikr commented Jul 18, 2026

Copy link
Copy Markdown
Member

Fixes: #64572

This PR fixes VFS lchown() handling so ownership changes apply
to the symbolic link itself instead of following the link and modifying
its target.

It routes synchronous and asynchronous lchown operations through
dedicated VFS and provider handling, adds memory-provider support
that does not follow the final symlink, and preserves fallback behavior
for providers that do not override lchownSync().


Assisted-by: openai:gpt-5.5

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem. labels Jul 18, 2026
@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 18, 2026
@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.23%. Comparing base (b8f81e9) to head (130b7b1).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/vfs/provider.js 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64573      +/-   ##
==========================================
- Coverage   90.25%   90.23%   -0.03%     
==========================================
  Files         739      739              
  Lines      241772   241796      +24     
  Branches    45571    45577       +6     
==========================================
- Hits       218204   218174      -30     
- Misses      15109    15157      +48     
- Partials     8459     8465       +6     
Files with missing lines Coverage Δ
lib/internal/vfs/file_system.js 99.60% <100.00%> (+0.23%) ⬆️
lib/internal/vfs/providers/memory.js 95.06% <100.00%> (+0.03%) ⬆️
lib/internal/vfs/setup.js 87.69% <100.00%> (ø)
lib/internal/vfs/provider.js 98.09% <83.33%> (-0.29%) ⬇️

... and 21 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trivikr
trivikr force-pushed the vfs-lchown-symlinks branch from 5518b6e to 130b7b1 Compare July 18, 2026 15:22
Route mounted lchown operations through VFS lchown handling and add
memory provider support that does not follow the final symlink.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@trivikr
trivikr force-pushed the vfs-lchown-symlinks branch from 130b7b1 to afee66e Compare July 18, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. vfs Issues and PRs related to the virtual filesystem subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vfs: lchown follows symlinks instead of updating the link

2 participants