Our FamilyForum

FamilyForum Documentation & Help => FamilyForum Features & Guidelines => Code & Stuff => Topic started by: Ken on January 06, 2016, 08:53:24 AM

Title: Deleting FTP accounts in the cPanel
Post by: Ken on January 06, 2016, 08:53:24 AM
Details on Deleting FTP accounts in the cPanel.
... extreme caution required!

It all started on Sunday 1/3/16, when I asked SMFHacks to look into an issue with file uploads in the Gallery. He needed an FTP account to look into the server files and so I made an account for him, but it would not connect up, so I ended up giving him access to my account. Meanwhile his (not working) account sat there unused.

Then on Monday, shortly after the noon hour, the site and the content vanished! Totally gone, all the files and folders and about 2500MB worth of content just gone.

After much thrashing around if finally came down to that FTP account that I made for SMFHacks. I was thinking that since it didn't work that it needed to be deleted and so I did. Then, at a little after 2PM on Tuesday my host (Frank) and me figured out what happened, me deleting that FTP account deleted the entire site!

Here is some detail:
Mystery solved.

This from the FTP Accounts Docs (https://documentation.cpanel.net/display/ALD/FTP+Accounts):
Quote
Delete

To remove an FTP account, perform the following steps:

    Click Delete for the FTP account that you wish to remove.

    Click the desired deletion option:

        Delete Account — Remove the FTP account only. This will not remove the files that the FTP account's home directory contains.

        Delete Account and Files — Remove the FTP account and all of the files that the FTP account's home directory contains.

        Warning:

        Only use this option with extreme caution. If the FTP account that you delete can access the public_html directory, this option automatically removes the public_html directory and all of its contents, which will break your website.

I do subscribe to the philosophy behind the statement, "RTFM" and I am quick to point out the need to do so, still, that check box statement seen in the image below gives no clue to the dangers involved and deleting an ftp account should not be able delete an entire site.

As I read the check box statement it the image below I would take it to mean that the users home directory would be 'minnie' and not 'public_html'  But when reading the Docs that is not the case.
My bitching about it won't change anything, but to me this check box thing is just plain wrong. I wonder if I'm the only one who has made this mistake?
Title: Re: Deleting FTP accounts in the cPanel
Post by: Skhilled on January 06, 2016, 09:03:23 AM
I did it twice in my life, I think. So now I just delete the account and manually delete the directory that was created manually. Luckily, I had R1Soft backups when it happened. ;)
Title: Re: Deleting FTP accounts in the cPanel
Post by: Ken on January 06, 2016, 09:11:32 AM
No backups available for me unfortunately.
Title: Re: Deleting FTP accounts in the cPanel
Post by: Skhilled on January 06, 2016, 09:22:28 AM
But you will soon. ;)
Title: Re: Deleting FTP accounts in the cPanel
Post by: Ken on January 06, 2016, 09:55:46 AM
But you will soon. ;)
:disturbed:
Title: Re: Deleting FTP accounts in the cPanel
Post by: Maxx on January 07, 2016, 08:43:26 AM
Ken Good Job Bro! did you get a local backup?

My  host Back pro only cost about 3.bucks a year I think, but I still keep local back ups.. To many themes to loose.

regards,
Maxx
Title: Re: Deleting FTP accounts in the cPanel
Post by: Ken on January 07, 2016, 09:12:07 AM
Love your avatar Maxx.  :thumbup:

Actually, there was not really a back up in the manner you would normally think of a back up. Rather, the data base was still intact so I loaded up a fresh set of SMF files and ran repair_settings.php... after that it was just a matter of reloading the Mods.
The big loss is image files and html pages. If you dig around in my TP articles (100+) you'll find lots of missing images and I do still have those images on my PC, but those articles may never be rebuilt as they were before. As for the html pages, that's where the 2500MB comes from, along with the image files of course. If you ever have poked around in my html pages you know that they just went on forever. Several 100's of them and those I also still have on my PC. My intention has always been to port them all over into TP articles and I've done so with a few, but have never mustered the energy to get into that really large project the way that I should.

I will rebuild those old pages as best I can... currently I'm putting together folders of images to ftp into the gallery and rebuild it. I had to drop the gallery tables and start from scratch so it will take some work to get it filled up with all the images again.

Of course, this all assumes that I don't break it again any time soon.  laughing7
Title: Re: Deleting FTP accounts in the cPanel
Post by: Ken on January 07, 2016, 09:30:59 AM
One good example of missing images is in This Article. (http://www.ourfamilyforum.org/FamilyForum/index.php?page=190)
Title: Re: Deleting FTP accounts in the cPanel
Post by: Maxx on January 08, 2016, 08:24:17 AM
I'm a pack rat, I have back up folders of my sites, images, files and db back ups on external and local PC drives.

most are dated! I have most of My themes Bloc themes and others, many mods, and other PC software as well. They came in handy when go bad :)

I know how hard it is lose it all !
It's even lots of work when you have backs ups!

regards,
Maxx
Title: Re: Deleting FTP accounts in the cPanel
Post by: Skhilled on January 08, 2016, 08:43:19 AM
I'm kind of the same way. I have some files from over 10 years ago on my drives! LMAO