码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2018-08-29 10:51:17      阅读:340      评论:0      收藏:0      [点我收藏+]

标签:ret   obj   perm   mes   -o   rgb   pool   tmp   inux   

安装了CentOS6.5,使用root用户运行,每个一段时间,终端会提示:

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

mail进入查看发现以下邮件内容:

[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

&

查看文件权限:

[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
Done

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

标签:ret   obj   perm   mes   -o   rgb   pool   tmp   inux   

原文地址:https://www.cnblogs.com/walkman-sky/p/9552139.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!