You are not logged in.

#1 2016-11-09 20:31:38

ryzion
Member
Registered: 2012-03-20
Posts: 95

Change mtime to "now" when storing a file on samba share

I've got a samba server running on my arch machine (ext4 filesystem). Basically I need creation/birth times on that share.
Is it possible to automatically set the mtime of each file to the timestamp it was copied to the share?

Offline

#2 2016-11-09 21:07:48

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Change mtime to "now" when storing a file on samba share

Look into smb.conf option "store dos attributes".


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2016-11-10 07:25:00

ryzion
Member
Registered: 2012-03-20
Posts: 95

Re: Change mtime to "now" when storing a file on samba share

I don't see how that helps. Just tried it but the behavior regarding times is exactly the same as before.

Offline

#4 2016-11-10 14:23:32

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Change mtime to "now" when storing a file on samba share

I've never used it, but It looks to me like it's the only thing that could do what you want:

In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store the create time for a file as well as the DOS attributes.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2016-11-10 14:30:21

ryzion
Member
Registered: 2012-03-20
Posts: 95

Re: Change mtime to "now" when storing a file on samba share

I've read that and it sounds good but there's no difference regarding the times I see on my Windows machine (accessed, created and modified time). The config option works otherwise (tested with hiding files).

Offline

Board footer

Powered by FluxBB