New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs.copyFile fails with permission denied when source is read-only #3117
Comments
See torvalds/linux@6f9718f - it's a cephfs bug that was fixed (well, mitigated) in Linux 4.20. There's no workaround but I'll open a pull request with a fallback. |
Pre-4.20 kernels have a bug where CephFS uses the RADOS copy-from command when it shouldn't. Fall back to a regular file copy. Fixes: libuv#3117 Refs: torvalds/linux@6f9718f
Nice find! Can't wait to test it out. Not sure why Node 12.18.4 works (it might be something else behind this, since NFS also seemed affected by the bug I found), but I have high hopes that this would fix it too. Will give that a try as soon as it's available in an update for me to test with. |
I see that this fix was released as part of libuv 1.42.0 which was included in node 16.7.0 released last week. Note that I was also able to reproduce a similar problem with a
(Note that running the same commands as above but without the The difference between |
Pre-4.20 kernels have a bug where CephFS uses the RADOS copy-from command when it shouldn't. Fall back to a regular file copy. Fixes: libuv#3117 Refs: torvalds/linux@6f9718f PR-URL: libuv#3123 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Trying to copy a read-only file onto a ceph-fuse filesystem fails, returning an `EACCES` error. This happens when the destination doesn't exist yet, and a new file is created. By checking that the error matches, and that the destination file is empty, we can fix this issue while waiting for a proper Ceph fix to be upstreamed. Fixes: libuv#3919 Refs: nodejs/node#37284 Refs: libuv#3117 Refs: libuv#3322
Trying to copy a read-only file onto a ceph-fuse filesystem fails, returning an `EACCES` error. This happens when the destination doesn't exist yet, and a new file is created. By checking that the error matches, and that the destination file is empty, we can fix this issue while waiting for a proper Ceph fix to be upstreamed. Fixes: #3919 Refs: nodejs/node#37284 Refs: #3117 Refs: #3322
See: nodejs/node#37284
cc @kakaroto
The text was updated successfully, but these errors were encountered: