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 346676 - SFTP UID/GID shouldn't be authoritative
SFTP UID/GID shouldn't be authoritative
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Module: ssh/sftp
2.17.x
Other All
: Normal critical
: 2.18
Assigned To: Christian Neumair
gnome-vfs maintainers
: 350038 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-05 17:16 UTC by Michael Monreal
Modified: 2006-12-29 01:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Proposed patch (1.02 KB, patch)
2006-07-12 20:25 UTC, Christian Neumair
committed Details | Review

Description Michael Monreal 2006-07-05 17:16:52 UTC
Some time ago, I was able to modify the permissions of files on my university's home directory using "nautilus sftp://user@server/home/user".Then, during 2.13.x this broke and said something along the lins of "cannot get file permissions". Now I tested again with latest 2.15.x from CVS and while it shows owner and group ids now, as well as the permissions, i cannot change them. On the bottom, it says "You are not the owner, so you cannot change the permissions."

But, i *am* the owner and I can edit permissions using chmod just fine when I log in with ssh. Also, I can open text files in gedit from the nautilus sftp window in read/write mode.

Something is broken here...
Comment 1 Jim Persson 2006-07-12 16:41:38 UTC
I can confirm this bug.
Nautilus should compare the UID/GID on files on remote filesystems with the UID/GID obtained when logging in (if the authentication subsystem supports it). If it's unsure it should not restrict the user from atleast trying I think ;)
Comment 2 Michael Monreal 2006-07-12 16:48:33 UTC
Well.. do you think this works if local user == remote user? I havn't tested this yet.
Comment 3 Jim Persson 2006-07-12 18:02:33 UTC
(In reply to comment #2)
> Well.. do you think this works if local user == remote user? I havn't tested
> this yet.
> 

Yes, if the remote UID is the same as the local user it works fine.
Comment 4 Christian Neumair 2006-07-12 20:23:35 UTC
Thanks for your bug report!

This is a GnomeVFS issue, which treats remote UID/GID info like local IDs. We just shouldn't set them, which pretends that you're allowed to chmod all files, at least until we parse SSH_FILEXFER_ATTR_OWNERGROUP specified in recent sftp drafts.
Comment 5 Christian Neumair 2006-07-12 20:25:20 UTC
Created attachment 68836 [details] [review]
Proposed patch

Also submitted to the gnome-vfs mailing list for review.
Comment 6 Michael Monreal 2006-07-13 10:28:35 UTC
Semi-fixed... I can change permissions now, but owner and group still say "unknown". I guess this should also be displayed correctly?
Comment 7 Michael Monreal 2006-07-13 10:32:33 UTC
Btw there's also "SELinux context" and "last changed". At least the latter should also be displayed.

I'm not sure if this is releated but I have another problem:

Clicking on a text file for example gives me "Couldn't display [...]". Naturally, If I drag the file to gedit, it will open just fine. Locally, gedit opens text files just fine... but in the nautilus properties, the type filed on the first tab also says "unknown". I guess mime types are not detected over sftp... should I file another bug about this?
Comment 8 Christian Neumair 2006-08-05 09:58:37 UTC
*** Bug 350038 has been marked as a duplicate of this bug. ***
Comment 9 Michael Monreal 2006-09-25 14:43:45 UTC
*ping*

What is holding this back? This really should have gone into 2.16 release because it is a very bad regression compared to the previous release where it worked...
Comment 10 Christian Neumair 2006-12-29 01:16:10 UTC
Committed, closing. It will be included in GNOME 2.18.