View Full Version : Don't use vqadmin to delete anything. EVER!
digdogger
03-19-2007, 06:47 PM
Just thought I'd let people know, I've lost my entire home directory due to a _BUG_ in vqadmin. I listed the "domains" in vqadmin, and found two domains, one that is the domain I am hosting on the machine, and the other was just a single word (not a FQDN), that was the name of my home directory (also the first few letters of my domain name). For example, if my domain name was 'test.example.com' the other "domain" listed in vqadmin would be "test" and a directory called /home/test exists, with my personal files, backed up a couple of weeks ago.
I ASS_U_ME_D that the entry with "test" by itself was a mistake, so I deleted it. I didn't think vqadmin would be written badly enough that it would delete all of /home/test. At worst, it should only delete /home/test/mail . Preferably, it should only remove lines from qmail configuration files so that the "deleted" domain is no longer being hosted by the qmail daemon, and NOTHING else.
For the vqadmin people (if you happen to come across this thread): Under no circumstances, for no reason, should vqadmin EVER delete ANY files, EVER! The one and only thing that should delete files is the 'rm' command. :mad:
w0ls0n
03-20-2007, 10:17 AM
Hello,
Not unless you have backups :-P
digdogger
03-21-2007, 02:43 PM
Hello. Sorry if I sounded a bit cranky in my earlier posting, but I did just blow away a bunch of files that I wanted. In fact, I'm not exactly sure what was there, so I'm not sure what I've lost. I am trying different experimental ways to recover the data from an ext3 filesystem
See: http://www.linuxquestions.org/questions/showthread.php?p=2677981&highlight=recover+ext3#post2677981
If figured that I would make a backup of the all the data on that drive that didn't get deleted, so I went out and bought another hard disk, and ran a copy operation on it to copy the files to the new hard disk. However, I forgot the last dot at the end of the copy command, so I ended up copying a bunch of stuff from various directories into the last directory I specified, instead of the current directory.
I really was trying hard to not perform any write operations on that drive to maximize the chance I would be able to recover data, and the commands that I used to make a backup copy of the data I have left ended up making things worse instead.
Ahhhhhhhhhhhhhhhhhhggggggggggggggggggggggg :mad: :mad: :mad: :mad:
this213
06-14-2007, 05:37 AM
A bit old, but I'll bite:
Vpopmail should most certainly delete files, that's how it stores its domains. However, I've never seen it touch anything outside of it's own home directory and, while I may not be some sort of master, I have been using it for at least the past 5 years.
Had you followed the instructions here, you would have a system under which these services are all run by a given user (vpopmail:vchkpw here) and this would not have even been possible. Whether or not there's a bug in vqadmin, I don't know - but I do know that I've not seen this behavior - nor seen it create any extraneous directories outside of it's own.
If you set vpopmail's directory as your own, that's your own fault. This is not why that directory exists - it exists to store mail and mail settings for your domains, not to store whatever you may think of next. It's not your home directory, it's vpopmail's and, accordingly, when you drop a domain, it very well should delete that directory because that's where it stores stuff. If you want to keep these directories for whatever reason, copy them somewhere before you go deleting domains.
If you set up vpopmail to use your own home directory, that's also your own fault. vpopmail requires it's own home directory for the reasons stated. You should have followed the directions.
Your best bet in getting that data back (if it's still something you need - this is more for people who come across this later, as I did) would be to create an equally sized ext2 partition and do something like (without either partition mounted):
dd -if=/dev/hdOLD -of=/dev/hdNEW
then you can follow the instructructions at these two locations:
http://recover.sourceforge.net/linux/recover/
http://www.tldp.org/HOWTO/Ext2fs-Undeletion.html
In the future, if you delete something of such importance, the very first thing you should do is unmount the partition and DON'T MOUNT IT AGAIN until you're sure you've gotten everything you can from it.
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.