GNOME Bugzilla – Bug 520571
File Attributes
Last modified: 2018-09-21 16:19:26 UTC
sftp backend should support setting file attributes like file permissions.
Created attachment 106636 [details] [review] Patch This patch implements try_query_settable_attributes and try_set_attribute methods. Only G_FILE_ATTRIBUTE_UNIX_MODE is supported since both SSH_FILEXFER_ATTR_UIDGID and SSH_FILEXFER_ATTR_ACMODTIME require two parameters and set_sttribute receives only one of them in each case.
It doesn't work with nautilus unless you have the same uid in the remote and local machine. See bug #520572
Commited this. Would be nice to support uid/gid and ctime/mtime too though... On unix you can do uid by passing gid == -1, maybe that works on sftp too.
Setting patch status to committed so it gets nuked of the list of not yet reviewed patches. (And confirming the bug ;-)
(In reply to comment #3) > Commited this. > Would be nice to support uid/gid and ctime/mtime too though... Please see my patch in bug 527339 - I think I got setting atime/mtime (and gvfs-copy --preserve) working properly on sftp. However, I am not sure if setting uid/gid is a good thing. At the very least, 'gvfs-copy --preserve' should *not* preserve uid, IMHO. When you are copying a file to a remote system, you typically want to preserve the timestamp, but it's very unlikely that your uid on the local machine will match the uid on the server.
bug #629135 has a patch adding support for user and group names ...
-- 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/41.