I accidentally ran sudo chmod 775 -R / instead of sudo chmod 775 -R ./ on my server and screwed up the permissions for everything. Now the server is broken.

Anyone know how I can quickly fix this???


3 Answers 3


If this is a RPM based distribution, you can use the following command to reset permissions to the RPM defaults:

rpm --setperms $(rpm -qa)

It'll at least get you started on the path.


You have backups, right? Hopefully ones that include both files and filesystem metadata? If this happened in my environment, I'd pull last night's backup down to fresh disks and get booted on that. Hope it works out for you!


This isn't a lot of help if you didn't know about it or use it before, but you can backup permissions in a restorable way. See Backing up permissions on Linux

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .