GNOME Bugzilla – Bug 161270
Can't create new folder using ftp method.
Last modified: 2007-02-02 10:07:09 UTC
Open nautilus window, Ftp to remote machine (ftp://user:passwd@IPaddress), go to the user's home directory. Create a new folder (Right click-> New Folder), folder named 'untiltled Folder' is created (don't rename this folder). Create another new folder (Right click-> New Folder), Observe that, user is not able to create a new folder, instead an error dialog is thrown with a message "Error creating new folder. You do not have permissions to write to the destination".
Normally (i.e file-method), When a folder is created in nautilus window, by default it will be associated with a name "Untitled Folder", on Creating another folder in the same location, it will be created as "Untitled Folder 1" (as because folder named "Untitled Folder" already exists) and similarly creates "Untitled Folder 2,...3...4...". But, the same theory is not applicable in case of FTP Method used via nautilus. When a `New folder` (Right click-> New Folder) is created (assuming that there already exists a folder named 'Untitled folder') on remote M/c via ftp-method, nautilus makes a call to ftp-method, which is a part of gnome-vfs modules. Here, `do_make_directory ()` is called to create a directory, which further calls `do_path_command_completely ()` with default `GnomeVFSResult` set for error code 550 to `GNOME_VFS_ERROR_ACCESS_DENIED`. And further commands are executed and appropriate response is set. On querying for response, error `550 Create directory operation failed` is obtained. But as because error code 550 is default set to `GNOME_VFS_ERROR_ACCESS_DENIED`, the error dialog pops up saying access denied. Note: "Ftp through command line also throws the same error (i.e `550 Create directory operation failed) if already that directory existed. Which is not very clear for the user". In this case, gnome-vfs error message should be something like 'GNOME_VFS_ERROR_FILE_EXISTS`. So that depending upon this result further iterations can be carried to create `Untitled Folder 1` and so on....
Looks to be bug in gnome-vfs modules. Moving to gnome-vfs.
Created attachment 45875 [details] [review] Proposed patch (against HEAD). Here comes a patch against the FTP and the SFTP method. The latter seems to contain debug messages, I've adapted to that. Binary protocols can be a bitch! They are actually, most of the time.
Created attachment 61609 [details] [review] Proposed patch Cleaner version, using gnome_vfs_uri_exists instead of hand-crafted get_file_info code.
Committed patch from comment 4, closing.
(In reply to comment #5) > Committed patch from comment 4, closing. I think you forgot to actually close this.