std::fs::copy failed with OS error 1 on Linux when copying over CIFS from local FS #66760
Labels
C-bug
Category: This is a bug.
O-linux
Operating system: Linux
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
I am using the following versions:
uname -r
: 5.3.0-23-genericnightly-2019-11-17-x86_64-unknown-linux-gnu
I was unable to perform a file copy with
std::fs::copy
when copying to a Windows shared folder mounted on Linux with the following options:rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777
I got OS error 1, which shouldn't happen since everyone has full permissions to the mounted NAS.
Interestingly, I was able to copy the files using
cp -r
without issue. I worked around this by writing something close to the following (all same except for error handling that I stripped out):It seemed strange to me that I get a permission denied despite that if I manually write the code to create and write the files using walkdir then it works completely file. I believe this is a bug in the code of std::fs::copy since the expected behavior is that it should work like
cp
(which just copies it as expected).I still have access to this setup, so I can test things if need be. Let me know if I can give more information to track down the bug.
The text was updated successfully, but these errors were encountered: