Am Freitag 30 Juli 2010 schrieb Harry van der Wolf: > 2010/7/30 Eric O'Brien <[email protected]> > > > I don't think he was *logged in* as root, (correct me if I have it > > wrong, Harry). I think he had switched his working directory to the > > *file system* root, then executed "sudo rm ..." > > > > It always seems that somewhere in the make/build/install process, > > commands need to be executed with elevated privileges. For example, the > > default install location is /usr/local/Application/Hugin.app. But /usr > > is owned by root. So "make install" fails at some point and I had to > > use "sudo make install." > > > > Now, to delete the files created there I'm going to have to "sudo rm ..." > > > > Aren't I? Or am I going about things the wrong way? > > > > I think one could redefine "rm" so that it wouldn't work from the file > > system root, or maybe warn you how many files you were about to destroy. > > Or something. Does anyone have "safety precautions" other than being > > very very careful? > > Eric is right. I was not logged in as root. I never do. But for some > actions you need admin (root) rights like deleting the /usr/local folder. > This can also cause "dangerous" situations as with sudo you temporarily > are root for the issued command(s). So, stupid mistakes can have dramatic > consequences. The big difference with sudo is that you don't act as root > all the time. That's also why I never use "su -" to change to a root > shell, but only sudo, as temporarily working under a root shell is almost > as dangerous. > > Harry
Good boy :)
Kornel
--
Kornel Benko
[email protected]
signature.asc
Description: This is a digitally signed message part.
