0

This question already has an answer here:

An employee accidental recursively changed permissions from the root directory to apache. I reran it to root, we fixed MySQL, but SSH still doesn't work. What is the correct way to restore the ownership for sshd?

marked as duplicate by HBruijn, Giovanni Tirloni, Jenny D, kasperd, Magellan Sep 28 '14 at 15:23

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.

  • You're probably best off restoring from backup. SSH isn't the only thing likely to be affected by this, and getting it back to normal is probably nearly impossible. – ceejayoz Sep 26 '14 at 14:58
1

If you just want to restore the permissions for sshd the command would be:

rpm --setugids openssh-server 

From the manual:

rpm --setugids PACKAGE_NAME sets user/group ownership of files in the given package..

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