LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-13-2018, 05:22 AM   #1
HansPL
LQ Newbie
 
Registered: Mar 2014
Location: Germany
Distribution: Mint Debian Ed.
Posts: 14

Rep: Reputation: Disabled
Samba timestamps SMB1 vs. SMB3


TL,DR: cp -a keeps mtime to a SMB1 share, loses it to a SMB2/3 share — how to fix?

I'm running Debian Stretch Samba file servers for Windows and Linux clients. I see (smbstatus -b) all our Win10 clients connecting with SMB3_11, our Linux clients (Mint LMDE2 = Debian Jessie) connecting with SMB1.
Now for security reasons I thought it wise to block the old SMB1 protocol. Server-side this is easy: adding a line min protocol = SMB2 to /etc/samba/smb.conf and reloading smbd does it. Unix extensions are active.

Now the Linux clients couldn't connect anymore. I was a bit surprised to learn that mount.cifs still defaults to SMB1. So I added in /etc/fstab the mount option vers=3.0:
//SERVER1/Home /mnt/home cifs vers=3.0,users,noauto,credentials=/home/[…]
Which re-enabled them, now connecting with SMB3_00 — fine, I thought.
I also added the line client min protocol = SMB2 to the client's smb.conf which is probably not necessary.

But then I noticed that files copied to the share mount points via cp -a or via a Wine client did not keep their mtimes; they get now the moment of uploading as their mtimes on the server, effectively killing any backup strategy.
With vers=2.0 or 2.1, same. With SMB1, they keep their mtimes.
Using gnome-commander or caja for copying to the mounts, the mtimes are kept even with SMB3. Huh?

I read (https://wiki.ubuntuusers.de/Samba_Client_cifs/ German, search for Zeitstempel) that copied files count as newly created if unix extensions are not active and owners on client and server are different — which is both not true here.

Now I'm at a loss… how do I keep the mtime on a SMB3 share?

Last edited by HansPL; 03-13-2018 at 06:25 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Kali Linux 2017.3 Ethical Hacking OS Brings InSpy, Sublist3r, and SMB3.0 Support LXer Syndicated Linux News 0 11-21-2017 09:09 PM
Timestamps kingsfischer Linux Deepin 1 07-25-2015 04:18 PM
Timestamps, VSFTP, Samba & files edited on a server dsackett Linux - Newbie 3 11-24-2008 01:10 PM
Timestamps Config Programming 2 04-22-2002 02:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration