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 559586 - Support for setting attributes
Support for setting attributes
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: daemon
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2008-11-06 12:54 UTC by Tomas Bzatek
Modified: 2018-09-21 16:30 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Tomas Bzatek 2008-11-06 12:54:15 UTC
This is a tracker bug. We want to have support for setting attributes in most common backends. This means setting file timestamps and Unix modes where applicable.

- DAV: no support atm, not sure if it's possible, would be nice to have it (WebDav is used for gnome-user-share)
- FTP: no support atm, use SITE UTIME and SITE CHMOD, not easy as argument format is not standartized
- SFTP: supports setting Unix mode, lacks timestamps
- SMB: no support atm
Comment 1 Tomas Bzatek 2008-11-06 13:43:48 UTC
SFTP support is subject to patch in bug 527339.
Comment 2 Tomas Bzatek 2008-11-10 16:41:19 UTC
SMB backend has now support for setting mtime (commit #2086 in trunk). 

The atime value is set to atime = mtime at the moment - we would need to do stat() to retrieve the second attribute as we're setting them both at the same time. Too expensive (and mostly useless) unless somebody really needs that.

Also, the code now has support for setting Unix modes however doing this might be confusing for users as there's no way to retrieve real file mode back in libsmbclient.
Comment 3 Chris 2009-03-02 15:57:36 UTC
Ah it seems I found the correct upstream bug number, that Tomas alluded to on the redhat bug tracker... :)

I still see this issue with gvfs 1.1.6 on Ubuntu 9.04 alpha5:

$ touch -d "Dec 25 2004" blah
touch: setting times of `blah': Operation not supported

Comment 4 Tomas Bzatek 2009-11-19 17:12:22 UTC
(In reply to comment #3)
> $ touch -d "Dec 25 2004" blah
> touch: setting times of `blah': Operation not supported
There was a bug in gvfs-fuse-daemon, fixed in commit 59bea4126cf23c575323c59a4cb1123f7cb44e2b. You should be able to touch the file on smb mounts now. Please note that smbclient reports success even if it actually fails, so don't be surprised.
Comment 5 awilliam 2011-11-28 12:24:30 UTC
Anyone considering implementing this for WebDAV?
Comment 6 Sascha Silbe 2011-11-28 12:57:43 UTC
For WebDAV, I've been giving it a try; see also #654679. Querying WebDAV properties works fine, for setting I'm getting weird corruption issues (random binary strings as result of query_{writable_namespaces,settable_attributes}, "Message Corrupt" when calling set_attributes_from_info()). Since no existing gvfs backend really supports this functionality yet (the extended attributes stuff is in glib/gio, not gvfs), I'm having a hard time figuring out whether my code is to blame or something else is going wrong (e.g. due to the ongoing transition to Gnome 3 in Debian).
If anyone wants to give it a try, I can publish the WIP patches.
Comment 7 Nrbrtx 2013-02-09 20:19:23 UTC
Unable to set attributes on Samba/CIFS .gvfs share with cp -pr.

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.
Comment 8 ville.ranki 2013-10-18 11:36:48 UTC
I can confirm this:

(fuse-sshfs mounted directory) $ touch test
touch: setting times of ‘test’: Operation not supported
$ touch -d "Dec 25 2004" test
touch: setting times of ‘test’: Operation not supported

gvfs version 1.16.1
Comment 9 awilliam 2014-10-07 10:56:40 UTC
Confirmed for WebDAV
-
awilliam@linux-86wr:/run/user/1000/gvfs/dav:host=127.0.0.1,port=8080,ssl=false,user=adam,prefix=%2Fdav/Projects/General Documents/Documents/Watermarks> touch Draft.pdf 
touch: cannot touch ‘Draft.pdf’: Operation not supported
-
gvfs-1.20.2-1.1.x86_64
Comment 10 Ross Lagerwall 2014-10-07 12:02:19 UTC
(In reply to comment #9)
> Confirmed for WebDAV
> -
> awilliam@linux-86wr:/run/user/1000/gvfs/dav:host=127.0.0.1,port=8080,ssl=false,user=adam,prefix=%2Fdav/Projects/General
> Documents/Documents/Watermarks> touch Draft.pdf 
> touch: cannot touch ‘Draft.pdf’: Operation not supported
> -
> gvfs-1.20.2-1.1.x86_64

AFAIK, there's no support for setting the mtime with webdav so this can never be supported.
Comment 11 awilliam 2016-01-29 14:12:34 UTC
OwnCloud at least permits setting mtime - so it depends on the server.  Any the server I maintain does as well [OpenGroupware Coils].  The ability to set mtime is critical for file-sync type setups.
Comment 12 awilliam 2016-01-29 14:14:32 UTC
Sascha Silbe, did you do any more work related to WebDAV properties?  If so do you have a patch I can play with?
Comment 13 Ondrej Holy 2016-02-01 15:58:58 UTC
There are some unfinished patches from Sascha in Bug 654679.
Comment 14 Sascha Silbe 2016-02-01 19:15:33 UTC
I'm afraid other than the patches attached to Bug 654679 there has been no further work on this from my side. I do not intend to work on this in the foreseeable future either. Feel free to pick up all or parts of the existing patches if they're of any help.
Comment 15 GNOME Infrastructure Team 2018-09-21 16:30:16 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/70.