Bug 452210 - Dolphin not preserving modified date of files when copying to manually mounted samba share
Summary: Dolphin not preserving modified date of files when copying to manually mounte...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.98.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-03 05:27 UTC by chrisgualo
Modified: 2025-02-08 16:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chrisgualo 2022-04-03 05:27:42 UTC
I am using kubuntu 21.10 at the moment, but I have experienced this since I first installed it, probably with 20.04. When I try to move/copy a file from any disk in my pc to a samba share the modified dates are not preserved. They seem to be copied for a moment but then immediately change to "now".

The samba share is set on an RPi4. This is my /etc/samba/smb.conf file:

[MyBook]
path = /media/MyBook
writeable = yes
create mask = 0777
directory mask = 0777
public = yes
browseable = yes
guest ok = yes
read only = no

This is my fstab file to mount the share through cifs:

//192.168.1.14/MyBook /media/MyBook cifs credentials=.smbcredentialsRPi4,iocharset=utf8,dir_mode=0777,file_mode=0777,x-systemd.automount,x-systemd.mount-timeout=30,_netdev 0 0

I am able to read/write the folders as expected, but when copying files the timestamps are not preserved. This is only happening to me from the kubuntu install. I also have a separate partition with ubuntu and ubuntu-mate, this does not happen when copying from there to the samba share. The weird part is that I used the exact same file in the three installations. When copying from my Windows partition, it also preserves the timestamps, so it seems to be a kubuntu-only issue and not how the samba share is set up on the RPi4. This also happens not only with Dolphin but with other file managers - I tried Nemo and Nautilus and they do not preserve the timestamps in my kubuntu setup.

To show what happens, I copied a test file from a local disk to the samba share. The modified file on the original file is 10/03/2018, but the copied file's modified date is "now".

Strangely enough, this does not happen when I use the samba address smb://192.168.1.14/MyBook/test/ as it does preserves the modified date. And if see the file from the mountpoint at /media/MyBook/test, it does show the correct modified date after it was copied.

Drive attached to the RPi4 is formatted as EXT4. My guess is that it has something to do with how the mountpoint was created, or cifs itself.

This is how the mountpoint looks with ls

chris@operarum:~$ ls -l /media/ | grep MyBook
drwxrwxrwx   2 chris chris    0 mar 31 22:32 MyBook

This is the output from the RPi4:

pinas@rpi4:~ $ ls -l /media | grep MyBook
drwxrwxrwx  22 root root 4096 Mar 31 22:32 MyBook

I also tried with using a root account to mount the cifs, but the results are the same. Not sure if it is a duplicate of bug #356651, but it is not fixed for me at least.
Comment 1 Nate Graham 2022-04-04 21:32:19 UTC
Can't test at the moment as my Windows Samba share stopped working. :(
Comment 2 Nate Graham 2022-04-04 21:33:45 UTC
Oh you've locally mounted it instead of using the SMB kioslave. That makes this not the SMB kioslave's fault' moving to KIO.

What exact version of KDE Frameworks are you using?
Comment 3 chrisgualo 2022-04-04 23:06:13 UTC
Hi, Nate. This is my system info:

Operating System: Kubuntu 21.10
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.2
Kernel Version: 5.13.0-39-generic (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i5-10400 CPU @ 2.90GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 660 Ti/PCIe/SSE2

Not sure what the difference between kio and kioslave is, but will do some digging. Thanks!
Comment 4 Nate Graham 2022-04-06 19:02:12 UTC
basically, when you access a Samba share using its smb:// url, KIO uses a worker process (with the unfortunate name of "ioslave") specifically for Samba shares: the "smb" ioslave. If you manually mount it, then KIO doesn't notice that it's a Samba share and it treats it as any other locally-accessed location, using the "file" ioslave that handles local files.
Comment 5 chrisgualo 2022-04-25 23:05:28 UTC
Thanks for the explanation, Nate! I upgraded yesterday hoping that somehow it would be magically solved with the new OS version, but the problem persists. Updated the information above to the current KDE Frameworks version 5.93.0.

Operating System: Kubuntu 22.04
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-25-generic (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i5-10400 CPU @ 2.90GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 660 Ti/PCIe/SSE2
Comment 6 chrisgualo 2022-09-18 04:08:43 UTC
Recently upgraded KDE Plasma, currently on 5.25.5

Operating System: Kubuntu 22.04
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3
Kernel Version: 5.15.0-47-generic (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i5-10400 CPU @ 2.90GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: Z490 GAMING X AX
System Version: -CF
Comment 7 chrisgualo 2022-11-30 03:43:12 UTC
Last week I upgraded, issue still persists. This does not happen while navigating the share with the smb protocol (smb://)

Operating System: Kubuntu 22.10
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.6
Kernel Version: 5.19.0-23-generic (64-bit)
Graphics Platform: X11
Processors: 12 × Intel® Core™ i5-10400 CPU @ 2.90GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: Z490 GAMING X AX
System Version: -CF
Comment 8 chrisgualo 2025-02-08 16:48:25 UTC
I don't know in what part this was fixed, but not happening anymore.