根目录/缺乏执行权限x产生的两种错误

Linux根目录缺乏x权限,产生的两个错误:

以root用户执行systemctl命令报权限相关问题

[root@hps2 ~]# systemctl stop hps-managernode

* (pkttyagent:10364): WARNING *: Unable to register authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Error registering authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files (g-dbus-error-quark, 2)linux

以root用户切换到普通用户下报错:

[root@hps2 ~]# useradd aihps
[root@hps2 ~]# su - aihps
su: warning: cannot change directory to /home/aihps: Permission denied
su: failed to execute /bin/bash: Permission deniedbash

解决方法

[root@hps2 ~]# stat /
File: ‘/’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fd01h/64769d Inode: 2 Links: 23
Access: (0600/drw——-) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-05-30 09:54:45.692000000 +0800
Modify: 2016-05-25 15:41:46.204000000 +0800
Change: 2016-05-25 15:41:46.204000000 +0800
Birth: -
问题出来了,这里的权限是错误的,X权限的丢失形成的。markdown

[root@localhost ~]#chmod 755 /
修改后,问题消失。ide

产生上述问题的操做:
第一种,chmod 666 /,能够致使。
或者,
第二种,chmod 700 /lib/ld-xxxx.so,也能够致使su失败。
有兴趣能够本身试一下。
/ 权限的丢失对于各类运行在本身用户身份上的daemon也存在一样的影响。spa

参考文章:http://blog.itpub.net/9606200/viewspace-745674/.net

相关文章
相关标签/搜索