0x000000B7 - Cannot create a file when that file already exists.
Cannot copy to network share (samba).
If I press ESC I can see created directory.
After that I can try copying again (F5) and it works.
Windows Explorer works fine.
When you'll get an error, press F3, copy all the content from appeared window, and paste it here
@Pxx64

Which Far build you are on? I recall there was similar bug fixed some time ago, please try the latest Nightly build from https://farmanager.com/download.php?l=en, and I can't reproduce the issue on my Samba share. In case if its reproducible for you on the latest build, please provide full steps to reproduce the issue, including Samba version and share configuration.
Nightly is also affected.
Do all using far manager.
- Create some directory on samba share: for example
Test. - Copy this directory to local disk on Windows machine.
- Delete Test directory at samba share.
- Try to copy Test directory from local disk to samba share.
- Error
Unfortunately, not reproducible for me. Which Samba version you are running? I'm on 4.13.1 now How the share is configured, any non-standard ACLs?
Btw, did you try with a clean profile? Just unpack nightly into separate folder, rename Far.exe.example.ini to Far.exe.ini, open it, uncomment and set UseSystemProfiles=0 save it, and then run Far from that folder
@alabuzhev I assume memory dump at the point when the error is appearing would be useless for debug, need to capture stacks before that with ttd or wpr/xperf?
@Pxx64, we try to call CreateDirectoryEx first (to inherit as much data as possible from the source directory), and, if it fails, we fall back to CreateDirectory.
Supposedly, CreateDirectoryEx is not a transactional operation within samba: first it creates it, then it tries to set some attributes and fails, not cleaning after itself and leaving the directory there as is, in a semi-created state. A subsequent CreateDirectory call fails because it's already there. We could probably workaround it, but someone needs to confirm first - all this is a pure speculation.
A dump will be useless indeed.
Please run this - gh-368.zip, e.g. test.exe C:\some_folder \\server\share\some_folder and show the output.
Which Far build you are on? I recall there was similar bug fixed some time ago, please try the latest Nightly build from https://farmanager.com/download.php?l=en, and I can't reproduce the issue on my Samba share. In case if its reproducible for you on the latest build, please provide full steps to reproduce the issue, including Samba version and share configuration.
Samba 4.12.12 (fc32, latest rpm from stable)
Please run this - gh-368.zip, e.g.
test.exe C:\some_folder \\server\share\some_folderand show the output.
CreateDirectoryEx failed with 183
Z:\Storage\Test exists after the failure
183 is ERROR_ALREADY_EXISTS (cannot create a file when that file already exists).
And directory is created by Win32 API. Is it a bug in API? Samba?
It does not look like a bug in Far Manager considering all above.
Workaround is easy I think, you can make a check like this one GetFileAttributes(dst) before 2nd attempt to create directory.
This confirms the assumption above. 🤦♂️
And directory is created by Win32 API. Is it a bug in API? Samba?
Samba of course. Win32 just forwards the command to the underlying drivers, network protocols etc. It looks like the classic "let's implement 53% of each spec and then hope that no app tries to do certain things in a certain way".
Try 9ae1a95 / 5769.
Samba of course.
Just some thoughts. I have used robocopy and installed some other managers like Double Commander.
Windows Explorer , Robocopy, Drag&Drop in FileZilla, Double Commander are not affected by this issue.
Though on Win7 only Far and Robocopy use SMB2 FSCTL_SRV_COPYCHUNK.
Samba of course.
Just some thoughts. I have used robocopy and installed some other managers like Double Commander.
Windows Explorer , Robocopy, Drag&Drop in FileZilla, Double Commander are not affected by this issue.
Though on Win7 only Far and Robocopy use SMB2 FSCTL_SRV_COPYCHUNK.
On the other hand, I've been writing daily to samba shares with Far, on both ArchLinux and Alpine servers for years, and I don't remember ever encountering this issue.
Samba of course.
Just some thoughts. I have used robocopy and installed some other managers like Double Commander. Windows Explorer , Robocopy, Drag&Drop in FileZilla, Double Commander are not affected by this issue. Though on Win7 only Far and Robocopy use SMB2 FSCTL_SRV_COPYCHUNK.
On the other hand, I've been writing daily to samba shares with Far, on both ArchLinux and Alpine servers for years, and I don't remember ever encountering this issue.
You need to do exact steps to reproduce the issue. Directory which you want to copy to samba should came originally from the same samba. For example, copy from samba to samba also fails if it is made with Far on windows.
Maybe I can try different live distros and mount partitions manually to finally find the reason.
But I afraid we will spend a lot of time in attempts to find it.
I will try but workaround for Far works fine ))
You need to do exact steps to reproduce the issue.
I did that, and it is not reproducible for me, same with "copy from samba to samba also fails if it is made with Far on windows.", both files and folders are copied fine, so this is either Samba 4.12 issue, or Fedora issue, or both, or config, or... )))
You need to do exact steps to reproduce the issue.I did that, and it is not reproducible for me, same with "copy from samba to samba also fails if it is made with Far on windows.", both files and folders are copied fine, so this is either Samba 4.12 issue, or Fedora issue, or both, or config, or... )))
@Pxx64 Windows 7?
Yes
Anything else here / can we close it?
Anything else here / can we close it?
Yes
@alabuzhev I am still getting it in 5800 build. No merged fixes?
@hardhub the fix is merged of course. If you still getting it, it's probably some slightly different issue, not covered by the fix.
I will have to repeat tests mentioned above and check what happens.
@alabuzhev Hi, I think I have found the information which can help. The same problem repeats if source directory is located on another samba share (at least if it is same samba server, but different shares).
So probably not all code paths are covered.
I have test once again with the tool from above comment and result is the same:
CreateDirectoryEx failed with 183
Z:\Some\Directory exists after the failure
@hardhub Please provide exact steps to reproduce it, what you see, what you expect, versions etc.
@alabuzhev It is hard to get exact steps. But I will try explain how it happens.
I have 2 network drivers mounted from 2 different samba shares on the same PC (protocol version SMB2_10).
I start copying from one drive to another.
I select multiple directories in Y:\Some\Nested\Path and copy all to Z:\Some\Nested\Path
First chosen directory copied well (selection is cleared), but before copying 2nd one I get the error.
Original issue was possible to reproduce much easier but current variant needs copying some files before it to occurs.
Usually I copy video files such way from one location to another.
And files are not transferred to client machine, it was copied fully on the server side (with the speed of disk array).
If you need more information let me know what I need to check.