remote-ftp
remote-ftp copied to clipboard
Hang when attempting to save a file when user doesn't have write permission
** Versions** Windows 10 Atom 1.11.2 Remote-FTP 0.9.3 (first observed with previous version, still present in current) I use SFTP and don't know if the protocol matters.
** Summary** When saving a file the logged in user doesn't have write access to, a helpful error is displayed in red: "Remote FTP: Upload Error Permission Denied."
However, the user interface hangs at this point and "Uploading [filename]" with progress bar continues to be displayed at the bottom of the remote-ftp tree view.
An exception is not generated, thus such data is not included here. I'm glad to gather logs, files, etc. if desired.,
Details
The condition persists if, after this error and WITHOUT RESTARTING Atom, I chmod the file in question to allow the user to write to it.
The condition persists if the file's tab is closed in the Atom editor. The progress bar continues to be visible and NO OTHER OPERATIONS can be completed using the remote-ftp plugin. That is, the user is not able to open any other files.
Restarting Atom is necessary in order to proceed. Operations succeed if the file's permissions have been set correctly after restarting the editor.
My humble suggestion When the "permission denied" error condition is encountered, automatically run the "abort current" function.
Reproduction Steps FTP into a Linux server as a non-root user. Open a file the logged in user has read permissions for but not write permissions. Modify the file and attempt to save it. I always use <CTRL><S> to save.
Workaround Issue the remote-ftp "abort current" command. Chmod the file on the server to allow the logged in user to write to it. Attempt the save operation again. Note that this will require making another change to the file in order for Atom to register it as changed. Just add and remove a space somewhere.
I'm having the same problem. The only way to make it work again is to restart Atom.
+1 For me reconnecting after chmod worked, but still.. And the error message when uploading new file is a bit misleading. It says "No such file" and I am like "Yea, you were supposed to create one!". Something like "Permission denied" would do.
Just to make sure the creator is aware, this STILL happens, and it's kind of annoying having to close and reopen Atom every time it happens.