2

Accidentally in /var/ directory I ran chown root . -R;chgrp root . -R. Now services like mysql don't start. Is there a way to restore default owner and groups?

If there is no way, what is the default owner and group of /var/lib/mysql directory and it's files?

hknik
  • 2,334
  • 3
  • 25
  • 26

1 Answers1

6

rpm --setperms --setguids will reset the permissions of packages you specify that may contain files under /var, but files in /var/lib/mysql are not managed by rpm. Fortunately, they're all owned by mysql:mysql so a single chown command will fix that.