You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fs.copyFile fails if source is readonly and target is a CIFS volume #60557
@johaven I can reproduce this issue. The problem occurs because fs.copyFile uses uv_fs_copyfile() which tries to preserve file permissions, but CIFS doesn't support setting read-only permissions on the destination.
The solution is to implement a fallback mechanism when uv_fs_copyfile() fails with EPERM on CIFS volumes - fall back to manual read/write operations that don't attempt to preserve the read-only permission.
I'd like to work on this fix. Should I proceed with implementing the fallback approach?
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
See libuv/libuv@0f696da - we already handle EPERM from the final fchmod, and have for a while. Can you get me an strace log of the actually failing system call?
Activity
ish1416 commentedon Nov 7, 2025
@johaven I can reproduce this issue. The problem occurs because
fs.copyFileusesuv_fs_copyfile()which tries to preserve file permissions, but CIFS doesn't support setting read-only permissions on the destination.The solution is to implement a fallback mechanism when
uv_fs_copyfile()fails with EPERM on CIFS volumes - fall back to manual read/write operations that don't attempt to preserve the read-only permission.I'd like to work on this fix. Should I proceed with implementing the fallback approach?
juanarbol commentedon Dec 3, 2025
Nice! Let me do a humble ping to @nodejs/libuv
github-actions commentedon Jul 2, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
johaven commentedon Jul 2, 2026
Up
bnoordhuis commentedon Sep 3, 2026
See libuv/libuv@0f696da - we already handle EPERM from the final fchmod, and have for a while. Can you get me an strace log of the actually failing system call?