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?


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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.