Nautilus reports file ownership incorrectly on sftp:// files

Bug #9252 reported by Mary Gardiner
38
Affects Status Importance Assigned to Milestone
GnomeVFS
Expired
Medium
gnome-vfs2 (Ubuntu)
Invalid
Medium
Ubuntu Desktop Bugs

Bug Description

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 ?

http://bugzilla.gnome.org/show_bug.cgi?id=155866: http://bugzilla.gnome.org/show_bug.cgi?id=155866

Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Phil Housley (undeconstructed) wrote :

Is this likely to be the same issue as that you can't change the owner/group of
a file over sftp? I don't even know if it's possible actually... but nautilus
makes it look as though it is, and then silently always resets the listbox back
to the original owner (ie. you, a la this bug.)

Revision history for this message
Mary Gardiner (puzzlement) wrote :

(In reply to comment #2)

It sounds sort of similar and probably having the same root causes (Nautilus
doesn't really have a way of representing remote ownership), but it's not
exactly the same bug: this one is about misrepresenting the ownership in the
first place (user "mary" does not own /dev or /bin on the remote host!), not
about being unable to change it.

Changed in gnome-vfs2:
assignee: seb128 → desktop-bugs
status: Unconfirmed → Confirmed
Changed in gnome-vfs:
status: Unconfirmed → Confirmed
Revision history for this message
spliffster (spliffster) wrote :

sftp (OpenSSH actually) offers the possibility to chown/chgrp/chmod remote files:

sftp> help chgrp
Available commands:
...
chgrp grp path Change group of file 'path' to 'grp'
chmod mode path Change permissions of file 'path' to 'mode'
chown own path Change owner of file 'path' to 'own'
...

on a second thought this is (however) tricky. on an NFS share it works fine in gnome, because local and remote uid's and gid's must be in sync for NFS to work properly. for scp/sftp this requirement is often not met (imagine sftp-ing to your web hosting provider).

I could see a solution for this problem only, if there would be a way to white/blacklist hosts/networks for gnome. the user of the client would have to tell gnome which hosts/networks are in sync (uid wise). or gnome could try to probe if information of a remote host are available via yp/nis or ldap.

the current behavour is "save" for unknown networks, but it's quiet a PITA if nis/ldap is in use.

Revision history for this message
Philipp Schlesinger (philipp-sadleder) wrote :

With Ubuntu feisty, gnomevfs 2.18.0.1 and nautilus 2.18.0.1, that probleam seems to be dealt with in same way:
Owner and group of a file a reportet as "unknown" and it is possible to change permissions on that remote file.

Revision history for this message
Ken (ken-waggies) wrote :

I have a compact flash card on my PC. Running Fiesty, Nautilus 2.18.1. The card is automatically mounted as a drive (not in any tables/files).
From Nautilus or a command line, I can't set files on the card to be readable or executable by group or others.
In the Nautilus Properties window, it can appear to do it, but on exiting Properties then looking again, it is unchanged.
I don't know if this is the same bug or not, but it sure is frustrating.

(The CF card is formatted FAT32.)

Revision history for this message
spliffster (spliffster) wrote : Re: [Bug 9252] Re: Nautilus reports file ownership incorrectly on sftp:// files

you must use another file system, unix permissions cannot be set on fat/ntfs.

Cheers,
-S

--
My God, it's full of source!

Changed in gnome-vfs2:
status: Confirmed → Triaged
Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

As said in comment 5, ownership are not anymore incorrectly reported, they are not reported at all for sftp://, Unknown is always displayed.
See http://mail.gnome.org/archives/gnome-vfs-list/2006-July/msg00029.html for details.

Revision history for this message
Jim Robert (jim-jim-robert) wrote :

For me it reports the permissions as unknown, and doesn't allow me to change them (even though I'm looking at files owned by my current user)

Changed in gnome-vfs:
status: Confirmed → Invalid
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Is this reproducible with Hardy ?

Changed in gnome-vfs2:
status: Triaged → Incomplete
Revision history for this message
Rick Gabriel (klaxian1) wrote :

The permissions seem to be displayed correctly in Hardy.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

great, closing the task then, thanks you.

Changed in gnome-vfs2:
status: Incomplete → Invalid
Changed in gnome-vfs:
importance: Unknown → Medium
status: Invalid → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.