Touché

I just ran into a problem in which I got myself cornered. I’ve edited a configuration file with elevated permission using sudo:

sudo vim /etc/httpd/conf.d/metrics.conf

From time to time when editing, I background the vim session in order to perform some commands in the shell, then continue working in vim. This time, I’ve sent the editor into the background. When trying to foreground it I got this:

~/Metrics(branch:bug_947304*) » fg
[1]  + 11403 continued  sudo vim /etc/httpd/conf.d/metrics.conf
[1]  + 11403 suspended (tty input)  sudo vim /etc/httpd/conf.d/metrics.conf

What? How? When? Any attempt to foreground this process failed. Reason was the elevated permission I’ve started the editor with. Long story short, you’ll need to kill the editor in order to get back into editing. This mailing list thread explains why.

Advertisements

My own stupidity

signEven as an experienced Linux user I sometimes fall into traps which reveals my own stupidity.

I tried to setup my smime configuration today to use it with my mailer. The command involved in it was smime_keys. This command had a little bug. A small workaround was posted on the debian bugs mailinglist:

vsauer@zaphod: ~ > ln -s . "~"
vsauer@zaphod: ~ > l -tr "~"

The workaround just creates a link to your own home directory to fool the smime_keys program (What a stupid hack actually).

What happened now, was the fact, that I stopped fixing the not working smime_keys program, because I had other things todo. I removed the link I created by using the workaround above:

rm -rf ~

Everyone who know how to interprete this command can laugh now 😉 Fortunately I was lucky – phew.

Blogged with the Flock Browser

Tags: ,