GNOME Bugzilla – Bug 155866
Respect GNOME_VFS_FILE_INFO_FIELDS_IDS
Last modified: 2008-05-18 16:03:52 UTC
This bug has been reported here: https://bugzilla.ubuntu.com/2538 "If I open a sftp:// directory in the Nautilus viewer, and right click on a file and select "Properties" and the "Permissions" table, the "File owner:" value will be incorrectly set to my local user ("mary") and the "File group" drop-down box will be set to "mary" (my local default group). This is true of *any* file on the remote host, including, say, /bin or /dev It still might be confusing to have them marked "root" or whatever, because they're owned by the remote root account -- perhaps root@remote-name ?"
*** Bug 158503 has been marked as a duplicate of this bug. ***
Sniplet from sftp-method.c:buffer_read_file_info(): /* Set the uid and gid fields naively to the current user to trick Nautilus */ info->uid = getuid (); info->gid = getgid (); Reassigning..
Why is that bogus info set intentionally?
*** Bug 169726 has been marked as a duplicate of this bug. ***
To Comment #3: it looks like it's because the UID mapping would be completely bogus, since the UID is not necessarily the same remotely; I guess nautilus should use a gnome-vfs method for getting uid<->user name mapping and use uid@host in remote files in case it's not able to get it... when that happens that ugly work-around may be removed from gnome-vfs' sftp method, I guess.
The gnome-vfs part is fixed. Now we need to get nautilus honor the GNOME_VFS_FILE_INFO_FIELDS_IDS flag.
Christian: We already seem to have some GNOME_VFS_FILE_INFO_FIELDS_IDS-related code, which uses getgrgid on the GnomeVFS file info's "gid" and getpwuid on the "uid" field if they're available, cf. nautilus_file_get_owner_name and nautilus_file_get_group_name. How does that deal with the remote case?
The related original Ubuntu bug is in Launchpad: https://bugs.launchpad.net/ubuntu/+source/gnome-vfs2/+bug/9252
Nautilus now reports Unknown as the owner and group for remote sftp files, as UID/GID retrieval though sftp seems to be deprecated, see: http://mail.gnome.org/archives/gnome-vfs-list/2006-July/msg00024.html http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-12.txt http://bugzilla.gnome.org/show_bug.cgi?id=346676 So can't this bug be closed ?
I'd say that this probably can be closed, if not for the change, then because it's obsolete with GVFS. Future SSH/SFTP issues should be reported in separate bugs.