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.

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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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