GNOME Bugzilla – Bug 141166
"generic error" when attempting to copying files over ssh / sftp with insufficient permissions
Last modified: 2008-06-25 07:46:10 UTC
Browse to an sftp:// (others?) url that you do not have permission to create a directory in. Attempt to create a directory: title: "Error creating directory." message: "Error 'Generic error' creating directory." I think we can all agree this error message is utterly useless.
I get "Error: Operation not permitted" error in 2.7.x. Does this still happen?
Correct. In 2.7 this appears to have been changed as you described. The error message however still "feels" like it's been pulled through two layers of API in order to reach the screen. I would more likely suggest something easy to read and process for a human being: "Could not create a new folder. You do not have permission to create a new folder here." I won't however give any suggestions about HOW to get that error message to say that. ;)
*** Bug 155860 has been marked as a duplicate of this bug. ***
I did a little digging into this. Nautilus has support for those nice error messages (handle_new_{folder,file}_vfs_error() in libnautilus-private/nautilus-file-operations.c), but depends on gnome-vfs to tell it the correct error. Over sftp, it looks to me like CVS HEAD gives an "Operation not supported" for creating folders and a "Generic error" for creating files. Gnome-vfs's sftp module is pretty dang vague because it is built on top of openssl, which is also vague. In this instance, it seems that openssl returns "Operation not supported" for the folder, and an error value that the sftp module doesn't catch for the file (which is why we end up seeing "Generic error"). Also, nautilus watches for GNOME_VFS_ERROR_ACCESS_DENIED to be returned, but it looks like if gnome-vfs-sftp ever would return a permissions error, it would be GNOME_VFS_ERROR_NOT_PERMITTED. So, either nautilus needs to watch for both or gnome-vfs-sftp should return ACCESS_DENIED.
the new nautilus using gvfs displays a correct message about the issue, closing the bug