I don’t want the “last modified” attribute to be updated with the current date when I am copying files to a mounted Samba folder. How can I avoid this behaviour ?
This behaviour occurs with (K)Ubuntu 12.04 and Ubuntu 15.10.
This behaviour can be reproduced using
- GUI tools: file browsers (tested with nautilus 3.4.2 and dolphin 2.0), sync-tools and
- CLI commands:
cp -p
in the terminal.
The Samba folder was mounted to the local file system either with:
sudo mount -t smbfs //mynas/folder /mnt/nas/ -o user=username
orsudo mount -t cifs //mynas/folder /home/mnt/nas/ -o user=username
.
Notes:
- When connecting to the same Samba folder (either with nautilus or dolphin) using a URL like
smb://username@mynas/folder/
then I can copy files to it without having the “modified time” attribute replaced with the current time! - But mounting a Samba folder is more convenient and also, not all tools support the smb protocol. This is, why using the URI
smb://
is not a workaround for me.