After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 693491 - Unable to set attributes/timestamps on CIFS/Samba share
Unable to set attributes/timestamps on CIFS/Samba share
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: smb backend
1.12.x
Other Linux
: Normal minor
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-09 20:03 UTC by Nrbrtx
Modified: 2018-09-21 17:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nrbrtx 2013-02-09 20:03:41 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.
Comment 1 Nrbrtx 2013-02-10 17:16:49 UTC
This bug is reproducible if I mount Samba-shared folder (Samba server is Ubuntu
12.04), not QNAP's.
Comment 2 Nrbrtx 2013-02-10 17:26:46 UTC
This bug is reproducible if I mount Samba-shared folder (Samba server is Ubuntu
12.04), not QNAP's.
Comment 3 Tomas Bzatek 2013-02-11 12:11:30 UTC
(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.
Comment 4 Nrbrtx 2013-02-11 19:31:11 UTC
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.
Comment 5 Nrbrtx 2013-02-11 20:23:01 UTC
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.
Comment 6 Ross Lagerwall 2014-05-28 07:57:18 UTC
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
Comment 7 GNOME Infrastructure Team 2018-09-21 17:21:03 UTC
-- 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.