New > File created a glitched directory and upon deletion it recursively deleted my entire website!

Advertisement

Elaskanator
Joined:
Posts:
4
Location:
USA

New > File created a glitched directory and upon deletion it recursively deleted my entire website!

I made a new file from the right click menu in the GUI and it instead created a folder (e.g. "my_new_file.html" as a directory) that seemed to contain a copy of the entire website.
So I deleted it. I should have stopped right away because it was deleting everything in the root directory!

After seeing the glitched folder I first went and updated my WinSCP installation before trying to delete it.

Some more details:
Created a file named "20220830_setlist.html" from the right click menu. It came into existence with the folder icon, and it causes HTTP 404 errors from the browser. Inside of WinSCP when I double click this new directory, it looks like I'm in the root directory of the website but the WinSCP navigation bar shows the full path like "/public_html/20220830_setlist.html/".
Able to rename it ("normally").
Upon restoring the website from a backup (thank GOD), the glitched directory's "contents" shows the root directory with what seems like a snapshot of the broken root directory after trying to delete the glitched directory. If I try to recursively navigate to it thru itself, it throws an error "no such file or directory" attempting the second iteration.
Last edited by Elaskanator on 2022-06-20 22:41; edited 1 time in total

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: New > File created a glitched directory and upon deletion it recursively deleted my entire website!

Thanks for your report.
What does the folder look like in ls listing in the shell?
Can you reproduce the problem (a folder created instead of a file)?

Btw, Didn't you actually mis-click the New > Link and created a link pointing to the root folder? Or to the parent folder. Creating a link to the parent folder by mistake is actually easy. When you enter a folder, the .. entry in focused. Even if you click New > Link in the blank panel area, the Point link to box is prefilled with ...

Reply with quote

Elaskanator
Joined:
Posts:
4
Location:
USA

It seems that a "link" would be the obvious explanation, as I cannot reproduce the issue anymore. But I swear I encountered the issue twice, and highly doubt I made that mistake both times. There was only a single text input field for the name.

However, I'm not getting shell commands to execute ("ls" and "dir" both throw HTTP 500 errors ("command not understood")).

The properties of this glitched directory show it as a "File folder" with all permissions (0777). See attached screenshot.

Here is the server protocol information:
Remote system = UNIX Type: L8
File transfer protocol = FTP
Compression = No
------------------------------------------------------------
Can change permissions = Yes
Can change ACL = No
Can change owner/group = No
Can execute arbitrary command = Protocol commands only
Can create symbolic/hard link = Yes/No
Can lookup user groups = No
Can duplicate remote files = No
Can check available space = No
Can calculate file checksum = No
Native text (ASCII) mode transfers = No
------------------------------------------------------------
Additional information
The server supports these FTP additional features:
  CLNT
  EPRT
  EPSV
  HOST
  LANG en-US*
  MDTM
  MFF modify;UNIX.group;UNIX.mode;
  MFMT
  MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.groupname*;UNIX.mode*;UNIX.owner*;UNIX.ownername*;
  REST STREAM
  SITE MKDIR
  SITE RMDIR
  SITE SYMLINK
  SITE UTIME
  SIZE
  TVFS
  UTF8

2_2022-06-20 16_54_04-resources - my website - WinSCP.jpg

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Regarding the shell commands: How are you executing them? Do you have SSH/shell access to the server?

Regarding the display of the folder: That might be a limitation of the FTP server. Would the display change if you disable the "Use MLSD command for directory listing"?
https://winscp.net/eng/docs/ui_login_ftp

The next version of WinSCP will include this change:
Issue 2091 – Do not offer to create a link to parent directory, when it happens to be selected, when starting to create a link

Reply with quote

Elaskanator
Joined:
Posts:
4
Location:
USA

Looks like just a basic FTP connection hosted thru iPower. Commands > Open Terminal. If I try running "LIST" it causes my entire connection to timeout and disconnect.
Disabling "MLSD command for directory listing" alters nothing.

I pulled up the management stuff on ipower.com and found the SFTP connection info. That shows the glitched folder as a link (the little arrow on the folder icon, bottom left corner) to the root directory.

So it seems my issue is isolated to connecting via FTP instead of SFTP.

Thank you!

Reply with quote

Advertisement

martin
Site Admin
martin avatar

You cannot use FTP LIST command in the Console window.
Regarding the "MLSD" option, I was asking if turning it off will make the folder show as a link.
Can you post session logs for both On and Off?

Reply with quote

Advertisement

You can post new topics in this forum