copy/move files between shared folder through windows

  • Hi,

    On OMV I have SSD with system (and one shared folder), and HDD with data as one shared folder. Both are mapped in windows as X: drive and second as Y: and I have no issue with writing/reading/executing/deleting files and folders on any of them (so permissions are rather ok) until I try to copy/move between drives through windows. The error is 0x8007003B: An unexpected network error occurred. The file I tried to copy appears on the destination drive - it has correct side however it just the shell (no data).

    I can copy data from one share to windows drive and then move to destination without issue but directly is impossible.
    Any advice?

    summary after troubleshooting:

    I have two SMB shares on my OMV server: one on an SSD (system + sharedfolder1) and one on an HDD (sharedfolder2). Both are mapped in Windows as network drives using the same server alias:

    Code
    \\raspberrypi\sharedfolder1 → X:
    \\raspberrypi\sharedfolder2 → Y:

    Windows can read, write, delete, and execute files on both shares individually without issues. However, if I try to copy or move files directly between these shares, I get an error (0x8007003B / “Unexpected network error”).

    Interestingly, if I map one of the shares using the server IP instead of the alias, e.g.:

    Code
    \\raspberrypi\sharedfolder1
    \\192.168.0.10\sharedfolder2

    then file transfer works perfectly, even using the same credentials.

    Cause:

    It appears that Windows treats two shares with the same server alias as a single SMB session, and tries to use server-side copy / offloaded copy (ODX). This fails when moving or copying between shares, even if permissions are correct. Using the IP forces Windows to treat them as separate servers, so it falls back to normal read/write copy.

    Possible solution:

    • Disable server-side copy either:

      • On Windows (disable ODX / CopyOffload via registry)

      • On Samba/OMV (add server side copy = no in the share’s extra options?)

    This allows direct copy/move between shares using the same alias, but has a caveat:

    • All server-side copy within that share is disabled, so operations like moving large files within the same share will be slower (no offloaded/server-side copy).

    Walk around: use netbios aliases = raspberry to avoid using IP \\raspberry\sharedfolder2 (and original hostname \\raspberrypi\sharedfolder1 for second share)


    Question:

    Is there a way in OMV/Samba to disable server-side copy only for operations between different shares, while keeping it enabled for copying/moving within a single share? That way we could keep alias mappings and still preserve performance for large file operations inside each share.

  • Use a file manager on OMV such as Midnight Commander. There are others too.

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.

    OMV AMD64 8.x on headless Tyan Thunder SX GT86C-B5630 1U Server with Intel Xeon Silver 4110 CPU @ 2.10GHz & 32GB DDR4 ECC RAM.

  • I prefer to use normal windows nevertheless I checked few options and it started to work, not sure what happened exactly since I've changed from minium SMB version 2 to 1 and back to 2... maybe indeed some ACL issue it was and needed SMB restart? now it works as supposed to with inheritance enabled

  • I prefer to use normal windows nevertheless I checked few options and it started to work, not sure what happened exactly since I've changed from minium SMB version 2 to 1 and back to 2... maybe indeed some ACL issue it was and needed SMB restart? now it works as supposed to with inheritance enabled

    I can do what you say without problem. I do not use ACL


    If you don't need the granular control of ACL, don't use it. Regular linux permissions are enough,


    Asrock B450M, AMD 5600G, 64GB RAM, 6 x 4TB RAID 5 array, 2 x 10TB RAID 1 array, 100GB SSD for OS, 1TB SSD for docker and VMs, 1TB external SSD for fsarchiver OS and docker data daily backups

  • I can do what you say without problem. I do not use ACL


    If you don't need the granular control of ACL, don't use it. Regular linux permissions are enough,


    Normally it works for most of the files, the problem is with files created by docker (the ownership of them is UID defined in docker compose, it is possible to copy on windows local drive and move to different OMV share location but not directly...)

  • OK, found 2 thing:
    1. docker takes over the source folder with chown most likely - it changes the owner of the folder and group but this is not solving the problem

    2. when I map source and destination location via alias eg \\raspberryPi it cannot be copied directly, when set source as IP and destination as alias (both same credentials) it works 8| any ideas?

  • OK, looks like it's a server side copy issue and I see that it should be possible to disable it, however I will lose quick moving possibility within one share while moving between two shares is the issue. Do you know if it is possible to disable server side copy only for coping/moving between shares?


    I've made walk around added netbios alias to not use IP on second share, like...

    \\raspberrypi\share1

    \\raspberry\share2

  • OK, found 2 thing:
    1. docker takes over the source folder with chown most likely - it changes the owner of the folder and group but this is not solving the problem

    2. when I map source and destination location via alias eg \\raspberryPi it cannot be copied directly, when set source as IP and destination as alias (both same credentials) it works 8| any ideas?

    Yes, docker containers take ownership of the files they create.


    That's the whole purpose of using containers that support PUID and PGID to specify ownership. Without that ability, the only other work around is to use the samba share's extra options to force the connection to read/write/behave with the same owner as the docker container with something like below, changing the stuff on the right of the = sign to the user, group, and permissions you need.


    The docker PUID/PGID is a better option though.


    Code
    create mask = <desired octal>
    directory mask = <desired octal>
    force create mode = <desired octal>
    force directory mode = <desired octal>
    force user = <user>
    force group = <group>

    Asrock B450M, AMD 5600G, 64GB RAM, 6 x 4TB RAID 5 array, 2 x 10TB RAID 1 array, 100GB SSD for OS, 1TB SSD for docker and VMs, 1TB external SSD for fsarchiver OS and docker data daily backups

  • Hi,
    I think I managed privileges for docker and smb and it works ok even with ACL - I think it has never been an issue.

    The problem is probably side copy between shares when connected with the same alias. Windows treat is as one share and try to move it without transfer it locally - separate alias helped, but it's a walk around, not the solution.

  • You might consider FileBrowser Quantum as a Docker container running as root. It's an easy way to copy and move between shared folders without any permission issues getting in the way.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!