Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 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.

1 Answer 1

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.