0

I accidently ran sudo chown -R user:user *.* (on Ubuntu 11.1) inside /var directory..

Even after running sudo chown -R root:root *.* (and rebooting) I keep getting GUI messages that some operations are not allowed (permission errors) and even trying to run mysql, raises

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Can this be undone?

obsd
  • 135
  • 1
  • 7
Joel
  • 127
  • 6

2 Answers2

5

You're going to have a headache fixing that manually. Your best bet is to restore from backup.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
0

Not easily. /var isn't owned entirely by root. Individual bits of software own individual directories there. For example, /var/run/mysqld should be owned by the MySQL user. Your best bet is to fix these permissions as you encounter errors.

devicenull
  • 5,572
  • 1
  • 25
  • 31