I recently had a terrible accident with filezilla which has literally cost me days to fix. In the course of 2 years of using Linux Mint (Ubuntu kernel) this is the third time I've managed to kill the system, have learnt something every time. Hardware has not yet caused a problem, more human error/ignorance. This time, it killed Windows 7 as well which sits on a physically separate hard drive in the case. I had mounted the Windows drive to access a file as the accident occurred and it somehow must have destroyed something in there quite badly. Am a beginner with Linux but don't think I can get away much longer without knowing more about groups, users and permissions, have been reading up. So yeah, I was just trying to update a website and saw all this stuff in the left panel of filezilla so pressed delete to get rid of it, thinking it was just some old folders from the previous time I updated the site and it was the whole file system! So it all froze, used xkill to close it and over the next hours ext4magic to recover some files which somewhat worked, but unfortunately Linux and windows both needed to be reinstalled. Was now at least able to put Linux on the bigger drive but don't want this to happen again. Why on Earth does a program like Filezilla which is there to move files to and from servers need to have the power to destroy a computer?!So have been wanting to set up things for safety. Created another user account called admin_acc from the gui and took away my user accounts admin rights. My user account is still a member of adm cdrom dip plugdev lpadmin sambashare . Is that too many for safety?Have installed safe-rm. Although the command cat /etc/safe-rm.conf lists all the 25 protected folders, including / and /home , the user-specific blacklist which is supposed to live in ~/.safe-rm does not exist! Do I have to simply create it myself? Installed safe-rm from the Mint installer wonder if it was the full version.. I'd like to have all the main folders and hidden folders of the home directory in that custom list.Am scared that that's not even enough though.. Apparently safe-rm just places a wrapper around rm and the full path /bin/rm still runs it as usual. Who's to know what command filezilla or some other program is going to execute in the background?Can see that applications as well as users can belong to groups as per this post. The goal is that nothing other than the superuser can delete any folders or hidden out of /home or /home/Documents or /home/pictures etc ever again.. What's the best way of achieving this, how many different measures need to be taken? No use just taking away filezilla's power need to make sure that no other application is going to be like a weapon sitting around waiting for someone to carelessly pull the trigger..Would be much grateful for some expert guidance here so my fresh, clean install can run peacefully for a long time now.
restricting rights of user account and applications for safety, protecting home directory contents from accidents
permissions;rm;group;home;filezilla
Do not use FileZilla as root or to connect as a root user. A normal user usually cannot do what you have described (not without sudo or su or a really misguided sudoers config (e.g., NOPASSWD)). You need to understand that there are two sides as well. Say you are a normal user on host1 and use FileZilla to connect to host2, you can still destroy host2 if you connect as the root user. As long as you run programs as a normal user and connect to other hosts as a normal user, you usually can't do much damage outside of that user's home directory. If your website files are located somewhere else (e.g., /var/www), then you can either recursively chown those files or more appropriately, add the normal user to a group that can read/write to those files (e.g., www-data).The concept of user permissions is actually really simple, yet complicated to explain. I suggest investing a few hours to a day in research on the subject to get a basic understanding, learn about the 4-2-1 rule and such.Also, as you said yourself, you do not know what FileZilla is going to do ... you may want to consider using more basic tools like ssh and sftp. It pays to learn these things and you also have more power to restrict yourself (e.g., aliasing rm to rm -i may be good for you).P.S. I doubt filezilla actually killed your Windows partition from what sounds like a rm -rf /. Rather, it probably took out the bootloader. 