Can anyone tell me how I can undo a sudo rm -r /var/run mistake?
I can't use sftp and mysql now.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityCan anyone tell me how I can undo a sudo rm -r /var/run mistake?
I can't use sftp and mysql now.
You can... reinstall debian!
There's a reason you should be careful with anything starting with "sudo rm", and this is it :P
reinstalling debian is not necessary. in /var/run are stored temporary pid files.. just try if restart of broken services works, if not, do dpkg -S /var/run
to see, which packages installed some subdirectories there (dpkg -L <PACKAGENAME> | grep /var/run
), eventually you might want to try dpkg-reconfigure <PACKAGENAME>
. then restart services (/etc/init.d/... restart
) or entire debian.
I had a simular problem, i must have removed this directory; and received :
Can't open /var/run/atd.pid to signal atd. No atd running?
When running
at -m now -f ./run_my_file
I was able to fix it remaking the directory and restarting the atdeamon (atd)
sudo mkdir /var/run
sudo atd
Goodluck, we all make mistakes :)
ps. probably not the most solid-proof solution, but it worked !
sudo mkdir /var/run
If something complains about a subdirectory missing, create it in the same way. But packages are supposed to be robust against that now, because /var/run
can be on a temporary file system. Worst case, reinstall the package in question.