CentOS6.5 `/etc/updatedb.conf': Permission denied

安裝了CentOS6.5,使用root用戶運行,每一個一段時間,終端會提示:node

You have new mail in /var/spool/mail/rootlinux

mail進入查看發現如下郵件內容:dom

[root@node2 ~]# mail 
Heirloom Mail version 12.4 7/29/08.  Type ? for help.
"/var/spool/mail/root": 18 messages 18 unread
>U  1 Anacron               Sun Aug 12 14:10  18/636   "Anacron job 'cron.daily' on node2"
 U  2 Anacron               Mon Aug 13 03:47  18/636   "Anacron job 'cron.daily' on node2"
 U  3 Anacron               Tue Aug 14 03:37  18/636   "Anacron job 'cron.daily' on node2"
 U  4 Anacron               Wed Aug 15 03:34  18/636   "Anacron job 'cron.daily' on node2"
 U  5 Anacron               Thu Aug 16 03:23  18/636   "Anacron job 'cron.daily' on node2"
 U  6 Anacron               Fri Aug 17 03:44  18/636   "Anacron job 'cron.daily' on node2"
 U  7 Anacron               Sat Aug 18 03:31  18/636   "Anacron job 'cron.daily' on node2"
 U  8 Anacron               Sun Aug 19 04:26  18/636   "Anacron job 'cron.daily' on node2"
 U  9 Anacron               Mon Aug 20 03:50  18/636   "Anacron job 'cron.daily' on node2"
 U 10 Anacron               Tue Aug 21 03:08  18/636   "Anacron job 'cron.daily' on node2"
 U 11 Anacron               Wed Aug 22 03:06  18/636   "Anacron job 'cron.daily' on node2"
 U 12 Anacron               Thu Aug 23 03:26  18/636   "Anacron job 'cron.daily' on node2"
 U 13 Anacron               Fri Aug 24 03:45  18/636   "Anacron job 'cron.daily' on node2"
 U 14 Anacron               Sat Aug 25 03:41  18/636   "Anacron job 'cron.daily' on node2"
 U 15 Anacron               Sun Aug 26 04:50  18/636   "Anacron job 'cron.daily' on node2"
 U 16 Anacron               Mon Aug 27 03:11  18/636   "Anacron job 'cron.daily' on node2"
 U 17 Anacron               Tue Aug 28 03:38  18/636   "Anacron job 'cron.daily' on node2"
 U 18 Anacron               Wed Aug 29 03:17  18/636   "Anacron job 'cron.daily' on node2"
& 2
Message  2:
From root@node2.localdomain  Mon Aug 13 03:47:01 2018
Return-Path: <root@node2.localdomain>
X-Original-To: root
Delivered-To: root@node2.localdomain
From: Anacron <root@node2.localdomain>
To: root@node2.localdomain
Content-Type: text/plain; charset="ANSI_X3.4-1968"
Subject: Anacron job 'cron.daily' on node2
Date: Mon, 13 Aug 2018 03:47:01 +0800 (CST)
Status: RO

/etc/cron.daily/mlocate.cron:

/usr/bin/updatedb: can not open `/etc/updatedb.conf': Permission denied

&

查看文件權限:spa

[root@node2 ~]# ls -lZ /etc/updatedb.conf
-rw-r--r--. root root unconfined_u:object_r:user_tmp_t:s0 /etc/updatedb.conf

因爲SElinux引發,重置設置,修復rest

[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
Done
相關文章
相關標籤/搜索