恢复系统目录权限 [英] Restoring System directories permissions

查看:86
本文介绍了恢复系统目录权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不小心更改了/文件夹中所有目录的权限.因此,许多服务无法正常工作.如何还原它们?

I accidentally changed the permission of all the directories in / folder. Because of this many of the services are not properly working. How to restore them back?

推荐答案

您可以使用所有已安装的RPM软件包重置权限,这应该会使大多数事情再次起作用.

You can reset the permissions with all installed RPM packages, that should make most things work again.

for p in $(rpm -qa); do rpm --setperms $p; done
for p in $(rpm -qa); do rpm --setugids $p; done

以root身份运行.

这篇关于恢复系统目录权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆