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 161270 - Can't create new folder using ftp method.
Can't create new folder using ftp method.
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Module: ftp
2.14.x
Other All
: High normal
: 2.14
Assigned To: Christian Neumair
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2004-12-14 14:07 UTC by Vijaykumar Patwari
Modified: 2007-02-02 10:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Proposed patch (against HEAD). (2.63 KB, patch)
2005-04-30 19:19 UTC, Christian Neumair
none Details | Review
Proposed patch (1.83 KB, patch)
2006-03-20 12:00 UTC, Christian Neumair
committed Details | Review

Description Vijaykumar Patwari 2004-12-14 14:07:18 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".
Comment 1 Vijaykumar Patwari 2004-12-14 16:16:24 UTC
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....

Comment 2 Vijaykumar Patwari 2004-12-16 03:44:40 UTC
Looks to be bug in gnome-vfs modules. Moving to gnome-vfs.
Comment 3 Christian Neumair 2005-04-30 19:19:22 UTC
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.
Comment 4 Christian Neumair 2006-03-20 12:00:51 UTC
Created attachment 61609 [details] [review]
Proposed patch

Cleaner version, using gnome_vfs_uri_exists instead of hand-crafted get_file_info code.
Comment 5 Christian Neumair 2006-03-20 17:46:58 UTC
Committed patch from comment 4, closing.
Comment 6 Teppo Turtiainen 2007-02-02 10:07:09 UTC
(In reply to comment #5)
> Committed patch from comment 4, closing.

I think you forgot to actually close this.