GNOME Bugzilla – Bug 693491
Unable to set attributes/timestamps on CIFS/Samba share
Last modified: 2018-09-21 17:21:03 UTC
0. I have a Samba share on QNAP NAS. 1. I mount it from Nautilus, and go to it in Gnome terminal (cd /run/user/1000/gvfs/smb<tab> on Fedora 18 LiveCD, cd ~/.gvfs/my_share_on_nas on Gentoo and Ubuntu 12.04 LTS). 2.1. I copy /etc/issue file to it with "cp -pr /etc/issue ." I get an error "cp: clearing permissions for ‘./issue’: Operation not supported" 2.2. I copy /etc/issue file to it with "cp /etc/issue . --preserve=timestamp" file is copied and has todays date. This bug exists in Fedora (gvfs-1.14.2-2.fc18, https://bugzilla.redhat.com/show_bug.cgi?id=461505), Gentoo (gnome-base/gvfs-1.12.3) and Ubuntu (gvfs-libs 1.12.1-0ubuntu1.1, https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/336761) and has long time history. If I mount share with mount -t cifs (old-style) timestamps are OK. Please fix this bug.
This bug is reproducible if I mount Samba-shared folder (Samba server is Ubuntu 12.04), not QNAP's.
(In reply to comment #0) > 2.1. I copy /etc/issue file to it with > "cp -pr /etc/issue ." > I get an error > "cp: clearing permissions for ‘./issue’: Operation not supported" This is probably correct, most backends don't support chmod/chown and proper error is returned.
Hello, Thomas! Thank you for reply. I understood 2.1 about chmod/chown. What do you think about 2.2? I tested many Linux distributions (as you can see from my first message), they use GVFS as default way to mount Samba shares (from Nautilus, with Gigolo, and with 'Connect to server...' Places menu option). Recently I added a bug to OpenSuse bugzilla (https://bugzilla.novell.com/show_bug.cgi?id=802997), they use gvfs 1.12.3-3.2.2. Preserving timestamps is very useful, for example for synchronization with FreeFileSync (see https://answers.launchpad.net/freefilesync/+question/220745) between local directory and QNAP NAS. For linux newbies mount/smbmount is difficult even with pyNeighborhood. I hope you add timestamp preserve to GVFS in newer versions. I'm ready to compile and test a snapshot.
I discovered interesting behaviour: if I copy file with gvfs-copy it will have normal timestamp (like in source file) - gvfs-copy copies time::modified timestamp to all time::* fields (as gvfs-info reports). So the problem is between GVFS and user-space.
Pretty easy to reproduce with cp --preserve=timestamp I have created an upstream bug with samba: https://bugzilla.samba.org/show_bug.cgi?id=10639
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/199.