Score:0

The last modified times and last access times are wrong

in flag

The samba server reports the same creation time all 3 values of creation time, last modified time and last access time to the clients.

How do I get it reporting the correct times?

$ samba --version
Version 4.17.7-Ubuntu

Thanks in advance.

Nikita Kipriyanov avatar
za flag
Which back-end file system on the server you use? Which kind of time stamps it supports? What are mount options (e.g. if `noatime` is present it will make it work like you observe)? Also note Linux's standard `stat()` system call simply [doesn't report creation time](https://en.wikipedia.org/wiki/Stat_(system_call)); while ext4 finally got it into the inode (recently), one needs to use alternate `statx()` call to retrieve it. Other file systems might not have this information at all, so nothing for Samba to report. Chances are, it is *impossible* to report correct creation time.
djdomi avatar
za flag
Questions seeking installation, configuration or diagnostic help must include the desired end state, the specific problem or error, sufficient information about the configuration and environment to reproduce it, and attempted solutions. Questions without a clear problem statement are not useful to other readers and are unlikely to get good answers.
crackpot avatar
in flag
@NikitaKipriyanov Oh, thanks for your question. I realize the samba share is actually hosted on Synology DSM. I should have asked on Synology forums as well. $ uname -a Linux DS918Plus 4.4.302+ #64570 SMP Thu Jul 20 00:07:29 CST 2023 x86_64 GNU/Linux synology_apollolake_918+ But the files were written from ubuntu through samba share.
crackpot avatar
in flag
@NikitaKipriyanov Running command stat does give me all times correctly. $ stat pga-2023.09.02-19.25.00.log File: pga-2023.09.02-19.25.00.log Size: 13852347 Blocks: 27056 IO Block: 4096 regular file Device: 54h/84d Inode: 1965 Links: 1 Access: (0777/-rwxrwxrwx) Uid: ( 1059/ nuc13) Gid: ( 100/ users) Access: 2023-09-02 19:55:12.809187728 +0100 Modify: 2023-09-02 19:25:00.000000000 +0100 Change: 2023-09-02 19:55:12.808187710 +0100 Birth: -
Nikita Kipriyanov avatar
za flag
That must have been added [into the question](https://serverfault.com/posts/1142911/edit). It is unreadable in comments. Well, I can see the "birth" (creation) timestamp is already lost :) There might be a bug in Samba as well, for example [in Ubuntu](https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2007055). If that bug comes from upstream, DSM must have been inherited it too. Also, it is kinda silly to use Samba to share files between Linuxes. NFS should work better, as it is native.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.