[Enterprise-support] [Bug 2007055] Re: cifs/samba mount not preserving file timestamps

2023-02-13 Thread Brian Murray
** Package changed: ubuntu => samba (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to samba in Ubuntu.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/2007055

Title:
  cifs/samba mount not preserving file timestamps

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2007055/+subscriptions


-- 
Mailing list: https://launchpad.net/~enterprise-support
Post to : enterprise-support@lists.launchpad.net
Unsubscribe : https://launchpad.net/~enterprise-support
More help   : https://help.launchpad.net/ListHelp


[Enterprise-support] [Bug 2007055] [NEW] cifs/samba mount not preserving file timestamps

2023-02-13 Thread Launchpad Bug Tracker
You have been subscribed to a public bug:

I think I've found a bug or regression in something when trying to mount
a remote samba share. Modified/Created times are not properly preserved
in newer versions of Ubuntu. Because of this, rsync thinks files are
different based on their modified times and keeps re-syncing them.

I have a NAS on my network, running samba.

I have two devices, a desktop and laptop. Both are running Ubuntu, and
set up the exact same way. The desktop is running ubuntu 20.04, the
laptop 22.04.

I have mounted the NAS on both devices the exact same way. I attempt to
copy a file (rsync) the exact same way. On the 20.04 desktop, this works
perfectly fine. On the 22.04 laptop, the modified times are not
preserved and set to the current time, preventing things like rsync -t
from working.

The only difference i can find is that between the two systems, the newer 
laptop 22.04 mount adds a few more options than the older system to the cifs 
mount options. These are added automatically without being specified explicitly 
(see the mount -v output below): 
* 'forceuid'/'forcegid' are changed to 'noforceuid'/'noforcegid
*  iocharset=utf8 added
*  serverino added

desktop:

$ lsb_release -rd
Description:Ubuntu 20.04.5 LTS
Release:20.04
$ apt-cache policy cifs-utils
cifs-utils:
  Installed: 2:6.9-1ubuntu0.2
  Candidate: 2:6.9-1ubuntu0.2
  Version table:
 *** 2:6.9-1ubuntu0.2 500
500 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 
Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
100 /var/lib/dpkg/status
 2:6.9-1 500
500 http://us.archive.ubuntu.com/ubuntu focal/main amd64 Packages
$ uname -a
Linux desktop 5.4.0-132-generic #148-Ubuntu SMP Mon Oct 17 16:02:06 UTC 2022 
x86_64 x86_64 x86_64 GNU/Linux
$ mount -v 
//nas/backup on /media/scratch type cifs 
(rw,relatime,vers=3.0,cache=strict,username=nas_rw,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.1.10,file_mode=0664,dir_mode=0775,soft,nounix,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)


laptop:

$ lsb_release -rd
Description:KDE neon 5.26
Release:22.04
$ apt-cache policy cifs-utils
cifs-utils:
  Installed: 2:6.14-1ubuntu0.1
  Candidate: 2:6.14-1ubuntu0.1
  Version table:
 *** 2:6.14-1ubuntu0.1 500
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
100 /var/lib/dpkg/status
 2:6.14-1build1 500
500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
$ uname -a
Linux laptop 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 
x86_64 x86_64 x86_64 GNU/Linux
$ mount -v
//nas/backup on /media/scratch type cifs 
(rw,relatime,vers=3.0,cache=strict,username=nas_rw,uid=1000,noforceuid,gid=1000,noforcegid,addr=192.168.1.10,file_mode=0664,dir_mode=0775,iocharset=utf8,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)

the remote NAS is a synology appliance, running Samba version 4.10.18.
SMB version 3

Steps to reproduce:
1. Similar setup, 1 device running 20.04, another running 22.04, otherwise up 
to date.

2. mount the NAS on both devices the exact same way
$ sudo mount -t cifs -o 
vers=3.0,credentials=/etc/samba/smbcreds,iocharset=utf8,rw,uid=1000,gid=1000,dir_mode=0775,file_mode=0664
 //nas/backup /media/scratch

3. on the 20.04 older desktop, create a test file and show the modify time
$ fallocate -l 1M test1.txt
$ stat test1.txt
  File: test1.txt
  Size: 1048576 Blocks: 2048   IO Block: 4096   regular file
Device: 801h/2049d  Inode: 13634663Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/desktop_user)   Gid: ( 1000/desktop_user)
Access: 2023-02-12 18:35:48.978743377 -0700
Modify: 2023-02-12 18:35:48.978743377 -0700
Change: 2023-02-12 18:35:48.978743377 -0700
 Birth: -

4. rsync the test file to the mount, stat the file and see the modify/change 
are preserved
$ rsync -avh test1.txt /media/scratch/
sending incremental file list
test1.txt

sent 1.05M bytes  received 35 bytes  2.10M bytes/sec
total size is 1.05M  speedup is 1.00
$ stat /media/scratch/test1.txt 
  File: /media/scratch/test1.txt
  Size: 1048576 Blocks: 2064   IO Block: 1048576 regular file
Device: 52h/82d Inode: 321811  Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/desktop_user)   Gid: ( 1000/desktop_user)
Access: 2023-02-12 18:38:25.671230900 -0700
Modify: 2023-02-12 18:35:48.978743300 -0700
Change: 2023-02-12 18:35:48.978743300 -0700
 Birth: -

5. rsync again, notice the file is correctly skipped.
$ rsync -avh test1.txt /media/scratch/
sending incremental file list

sent 68 bytes  received 12 bytes  160.00 bytes/sec
total size is 1.05M  speedup is 13,107.20

6. repeat the same steps above on the newer 22.04 laptop, only this time notice 
that the modify/change are NOT preserved. rsync re-sends the file because 

Re: [Enterprise-support] [Question #705019]: Apache VirtualHost Issue

2023-02-13 Thread Bernard Stafford
Question #705019 on apache2 in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/apache2/+question/705019

Status: Open => Answered

Bernard Stafford proposed the following answer:
https://httpd.apache.org/docs/2.4/
https://httpd.apache.org/docs/2.4/vhosts/
Documentation for Apache.

-- 
You received this question notification because your team Ubuntu
Server/Client Support Team is an answer contact for apache2 in Ubuntu.

-- 
Mailing list: https://launchpad.net/~enterprise-support
Post to : enterprise-support@lists.launchpad.net
Unsubscribe : https://launchpad.net/~enterprise-support
More help   : https://help.launchpad.net/ListHelp