[root@localhost ch]# updatedb
updatedb: can not open `/etc/updatedb.conf': Permission denied
查看文件权限:
[root@node2 ~]# ls -lZ /etc/updatedb.conf -rw-r--r--. root root unconfined_u:object_r:user_tmp_t:s0 /etc/updatedb.conf
由于SElinux引起,重置设置,修复
[root@node2 ~]# restorecon -RFv /etc/updatedb.conf restorecon reset /etc/updatedb.conf context unconfined_u:object_r:user_tmp_t:s0->system_u:object_r:etc_t:s0 [root@node2 ~]# ls -lZ /etc/updatedb.conf -rw-r--r--. root root system_u:object_r:etc_t:s0 /etc/updatedb.conf