Issue with synchronization failing to preserving ownereship/creation dates

I've been having issues in which synchronizing folders/files between two Linux servers fails to preserve Folder Creation Dates and/or Ownership.

I have read posts about the potential for 'not having rights to change attributes' on remote servers, but I do not believe this is the case.

Using DOpus v13.1 x64 on Windows 11, I'm synchronizing between (Left) a Linux Server using Samba on ext4 and a (Right) TrueNAS Linux Server using Samba on a ZFS Filesystem. My goal is to preserve folder and file creation and modified dates along with file ownership and security permissions.

I am running DOpus as administrator, the "ADMINISTRATOR" token appears in the titlebar. I am in an Active Directory Domain in which both linux servers are Bound. They both preserve file permissions, ownership and date information properly for general Windows tasks, so I do not believe the issues in specific to the two linux servers.

In DOpus, I have these preferences set:
File Operations/Copying Files/Attributes
Copy File Attributes=Checked
Timestamps/Copy modified timestamp=Checked
Timestamps/Copy Created timestamp=Checked
File Operations/Copy File Ownership=Checked
File operation/Copy secutiry permissions when copying, or moving between drives=Checked

I am assuming (perhaps incorrectly?) that these settings apply to Folders as well as Files, since there I could find no similiar setting in Preferences/Folders.

A search through preferences for the word 'timestamp' reveals a Miscellaneous/Advanced variable named: "no_copy_dir_dates", which is set to false. I have left this in this default setting of False.

In some cases, file ownership is preserved. Folder Ownership is not preserved, using the owner of the session sunning Directory Opus for all folders created. During these new folder creations, the Date Modified of the folder is written over the Date Created.

I've attempted to observe the file logs in DOpus, but even with 'all' verbosity, the logs don't show any type of warnings/errors about the synchronization....only the successful copied files.

Is there a way to get a log of failed ownership or date changed from DOpus so I can troublshoot this further?

We recommend against that. See Why NOT to run Opus as Administrator under UAC

Correct.

But the options for copying permissions/ownership only apply to Windows file permissions/ownership. I am not sure how Samba or ZFS will treat Windows API calls to query and set permissions/ownership when Windows and Linux use a different model for those concepts.

Folder dates are also fragile, since anything that changes the directory listing can bump them. (Although that also depends on the filesystem and OS involved. It's a Windows convention but other OS may be different.)

And servers, especially ones running other operating systems, are free to ignore or reinterpret requests to do with metadata.

Have you tried the same sync between two local drives? That should show what Opus is doing. If that works but you get different results with a Samba network drive running ZFS, it's likely the problem is at the other end or a limitation of which Windows API actions Samba can bridge to the Linux world.

1 Like

Understood about UAC/Administration.

Both our Linux servers with Samba and ZFS support Windows querying and setting windows permissions/ownership. To test this, I used DOpus' to successfully changed the Properties/ownership of files and their Creation and Modify times of tiles on both servers from within the application. I have also used vb.net code to alter ownership and creation modify times on these servers in the past.

To narrow down the issue(s) I'm seeing a bit:

Issue 1: If I use DOpus to copy several folders and files from server 1 (left) to server 2 (right), the Created times of folders on Server 2 (right) show Today/now times.

if I use Synchronize to do the same thing, with nothing on server 2 (right) at the start, the Created times of folders on Server 2 (right) are preserved from the folders on Server 1 (left).

Shouldn't Synchronize be preserving the Folder Creation times on the right?

Beware ownership when copying on/from/to different linux servers. In most cases (e.g. when users are not shared through approriate common AD), users may be declared the same but won't : meaning, they can have the same name but not the same UID.
Plus, when connecting via SMB, you actually are connected as a specific user, changing owner may not even be possible ...

Yes, all sharing and binding is through AD, works and changing owners & attributes is possible (as mentioned earlier in the thread). Thanks.

So in one situation the folders already exist, and in the other they don't?

Opus will only set the Created timestamp on a folder that it creates during the copy. It'll be left as it was if the folder was already there.

No, in both instances, the destination (right) is cleared out before the operation.

For both the copy and the synchronize, the destination folders are being created.

It seems as though a copy and a synchronize (both with no destination material) are using different Create Times.

Any thoughts on why a Copy and a Synchronize would result would have different results based upon the above settings when it comes to Create Times?