GNOME Bugzilla – Bug 331072
Editing ftp files via vfs shouldn't be on by default.
Last modified: 2009-12-29 10:25:06 UTC
Using nautilus to browse an ftp location I can right-click and then edit the file however it always opens up as read only, even if permissions are 777. I can then go to "save as" and overwrite the supposedly read only file Starting gedit from a terminal, typing in some random gibberish and then overwriting an existing file works absolutely fine. The writable vfs schemas in gconf are ssh, sftp, smb, dav and davs. If editing ftp files isn't safe then isn't this behaviour dangerous? If it is safe, then surely the first way should work? gedit 2.13.90
part of the problem is that in unix if a user has permission to delete and create files in a directory, in this directory he can also delete files he doesn't have permissiono to write to: now gedit remote save works by saving a local file and then tranfering the file to the remote location and replacing the old file, so gnome-vfs doesn't complain if you replace a file you don't have permission to write, provided you have permission to write in the dir. Our reason to avoid ftp in the enabled protocols is due to the also fact that getting permissions with the ftp method of gnome-vfs is not reliable.
Do you mean you are able to use the ftp method for writing (using the "save as" dialog) even if "ftp" is not writable vfs schema in gconf?
Yes, that's exactly what I meant. Sorry for not being clearer.
We probably need to add some checks about the URI returned by the Save (As) dialog.
Another place to add checks is the dialog auto-opened when closing a modified file. Here there are no checks about writable schemas, and it indeed saves over ftp even if it is not configured as such in gconf.
The problem is mentioned in https://launchpad.net/distros/ubuntu/+source/gedit/+bug/38066 as well.
also reported as http://bugzilla.gnome.org/show_bug.cgi?id=331072
oops, bad copy paste ;) I mean http://qa.mandriva.com/show_bug.cgi?id=37759
If user can put file into some ftp location then he think, that this file should be editable, so, this is an usability issue. Maybe editing ftp files is safe in gvfs/gio, or still not safe? We should either open file in read-write mode and display a warning (If you think, that editing ftp files still isn't safe) when user wanna save this file in ftp location or open file in read-only mode and display an explanation why file from ftp location is opened in read-only mode. Btw, bluefish editor opens file in read-write mode from ftp locations.
This was obsoleted by the switch to gio/gvfs