linux,darwin: make uv_fs_copyfile behaves like cp -r#4396
Merged
santigimeno merged 1 commit intolibuv:v1.xfrom May 8, 2024
Merged
linux,darwin: make uv_fs_copyfile behaves like cp -r#4396santigimeno merged 1 commit intolibuv:v1.xfrom
uv_fs_copyfile behaves like cp -r#4396santigimeno merged 1 commit intolibuv:v1.xfrom
Conversation
4770b18 to
2ca7cfc
Compare
saghul
reviewed
May 6, 2024
cjihrig
reviewed
May 6, 2024
2ca7cfc to
a5c5097
Compare
santigimeno
requested changes
May 6, 2024
a5c5097 to
b1db4a1
Compare
This commit changes the timestamps in the file, the ownership and the group. Fixes: libuv#3125 Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
b1db4a1 to
0f1e23c
Compare
saghul
approved these changes
May 6, 2024
santigimeno
approved these changes
May 7, 2024
cjihrig
approved these changes
May 8, 2024
skooch
added a commit
to skooch/libuv
that referenced
this pull request
Mar 11, 2026
futimens() on CIFS/SMB shares may fail with EPERM because these filesystems do not support setting arbitrary timestamps. Since preserving timestamps during copyfile is best-effort, detect the CIFS/SMB condition using uv__is_cifs_or_smb() and squelch the error, matching the existing handling for fchmod() in the same function. Without this fix, uv_fs_copyfile() fails with EPERM when copying files to CIFS/SMB mounts on Linux (e.g. Alpine containers with mounted cifs shares). Fixes: nodejs/node#56248 Refs: libuv#4396
skooch
added a commit
to skooch/node
that referenced
this pull request
Mar 11, 2026
Original commit message:
unix: squelch futimens() EPERM on CIFS/SMB shares in copyfile
futimens() on CIFS/SMB shares may fail with EPERM because these
filesystems do not support setting arbitrary timestamps. Since
preserving timestamps during copyfile is best-effort, detect the
CIFS/SMB condition using uv__is_cifs_or_smb() and squelch the error,
matching the existing handling for fchmod() in the same function.
Without this fix, uv_fs_copyfile() fails with EPERM when copying
files to CIFS/SMB mounts on Linux (e.g. Alpine containers with
mounted cifs shares).
Refs: libuv/libuv#4396
Fixes: nodejs#56248
skooch
added a commit
to skooch/libuv
that referenced
this pull request
Mar 11, 2026
futimens() on CIFS/SMB shares may fail with EPERM because these filesystems do not support setting arbitrary timestamps. Since preserving timestamps during copyfile is best-effort, detect the CIFS/SMB condition using uv__is_cifs_or_smb() and squelch the error, matching the existing handling for fchmod() in the same function. Without this fix, uv_fs_copyfile() fails with EPERM when copying files to CIFS/SMB mounts on Linux (e.g. Alpine containers with mounted cifs shares). Fixes: nodejs/node#56248 Refs: libuv#4396
saghul
pushed a commit
to skooch/libuv
that referenced
this pull request
Mar 12, 2026
futimens() on CIFS/SMB shares may fail with EPERM because these filesystems do not support setting arbitrary timestamps. Since preserving timestamps during copyfile is best-effort, detect the CIFS/SMB condition using uv__is_cifs_or_smb() and squelch the error, matching the existing handling for fchmod() in the same function. Without this fix, uv_fs_copyfile() fails with EPERM when copying files to CIFS/SMB mounts on Linux (e.g. Alpine containers with mounted cifs shares). Fixes: nodejs/node#56248 Refs: libuv#4396
skooch
added a commit
to skooch/libuv
that referenced
this pull request
Apr 15, 2026
futimens() may fail with EPERM on CIFS/SMB shares that do not support setting timestamps. Since preserving timestamps during copyfile is best-effort, ignore the return value unconditionally. Fixes: nodejs/node#56248 Refs: libuv#4396
saghul
pushed a commit
that referenced
this pull request
Apr 17, 2026
futimens() may fail with EPERM on CIFS/SMB shares that do not support setting timestamps. Since preserving timestamps during copyfile is best-effort, ignore the return value unconditionally. Fixes: nodejs/node#56248 Refs: #4396
skooch
added a commit
to skooch/node
that referenced
this pull request
Apr 21, 2026
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: nodejs#56248
nodejs-github-bot
pushed a commit
to nodejs/node
that referenced
this pull request
Apr 25, 2026
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: #56248
PR-URL: #62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
aduh95
pushed a commit
to nodejs/node
that referenced
this pull request
May 5, 2026
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: #56248
PR-URL: #62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
aduh95
pushed a commit
to nodejs/node
that referenced
this pull request
May 7, 2026
Original commit message:
unix: treat futimens() as best-effort in copyfile
futimens() may fail with EPERM on CIFS/SMB shares that do not
support setting timestamps. Since preserving timestamps during
copyfile is best-effort, ignore the return value unconditionally.
Refs: libuv/libuv#4396
Fixes: #56248
PR-URL: #62881
Refs: libuv/libuv#5053
Refs: libuv/libuv#4396
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit changes the timestamps in the file, the ownership and the group.
Fixes: #3125
Am I missing any metadata here?
juan@ubuntu:/tmp$ ls -l | grep cop -rwxrwxrwx 1 juan testing 811 Apr 26 22:12 copied -rwxrwxrwx 1 juan testing 811 Apr 26 22:12 copied2 -rwxrwxrwx 1 juan testing 811 Apr 26 21:47 copyFile.c