美文网首页
2022-02-18

2022-02-18

作者: langlyyy | 来源:发表于2022-02-18 18:39 被阅读0次
    image.png
    image.png

    [root@localhost ~]# chmod 644 /var/log/messages
    chmod: changing permissions of ‘/var/log/messages’: Operation not permitted

    [root@localhost ~]# journalctl -xe
    Feb 18 18:31:26 localhost.localdomain rsyslogd[1267]: file '/var/log/secure': open error: Permission denied [v8.24.0-57.el7_9.1 try http://www.rsyslog.com/e/2433 ]
    Feb 18 18:31:26 localhost.localdomain rsyslogd[1267]: action 'action 1' resumed (module 'builtin:omfile') [v8.24.0-57.el7_9.1 try http://www.rsyslog.com/e/2359 ]
    Feb 18 18:31:26 localhost.localdomain rsyslogd[1267]: file '/var/log/secure': open error: Permission denied [v8.24.0-57.el7_9.1 try http://www.rsyslog.com/e/2433 ]
    Feb 18 18:31:26 localhost.localdomain systemd[8488]: Failed to chown socket at step GROUP: No such process

    image.png
    image.png

    [root@localhost ~]# echo "" >> /var/log/messages
    -bash: /var/log/messages: Permission denied
    [root@localhost ~]# chattr -i /var/log/messages
    [root@localhost ~]# lsattr -a /var/log/messages
    ---------------- /var/log/messages
    [root@localhost ~]# echo "" >> /var/log/messages
    [root@localhost ~]# stat /var/log/messages
    File: ‘/var/log/messages’
    Size: 342 Blocks: 8 IO Block: 4096 regular file
    Device: fd00h/64768d Inode: 33849780 Links: 1
    Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2022-02-18 18:27:18.222968086 +0800
    Modify: 2022-02-18 18:35:04.462971928 +0800
    Change: 2022-

    相关文章

      网友评论

          本文标题:2022-02-18

          本文链接:https://www.haomeiwen.com/subject/kebylrtx.html