Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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?

share|improve this question

marked as duplicate by Michael Homer, jasonwryan, cuonglm, slm Jul 4 '15 at 1:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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.

share|improve this answer

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