微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Centos chattr lsattr 文件系统的隐藏权限命令

通过chattr设置档案的隐藏权限。

Centos chattr lsattr 文件系统的隐藏权限命令


[root@roth-01 ~]# chattr +j /mnt/gfs2/gfs2_dir/newfile [root@roth-01 ~]# lsattr /mnt/gfs2/gfs2_dir ---------j--- /mnt/gfs2/gfs2_dir/newfile 

[root@roth-01 ~]# chattr -j /mnt/gfs2/gfs2_dir/newfile [root@roth-01 ~]# lsattr /mnt/gfs2/gfs2_dir ------------- /mnt/gfs2/gfs2_dir/newfile 
[root@roth-01 ~]# chattr -j /mnt/gfs2/gfs2_dir [root@roth-01 ~]# lsattr /mnt/gfs2 ---------j--- /mnt/gfs2/gfs2_dir [root@roth-01 ~]# touch /mnt/gfs2/gfs2_dir/newfile [root@roth-01 ~]# lsattr /mnt/gfs2/gfs2_dir ---------j--- /mnt/gfs2/gfs2_dir/newfile
http://docs.redhat.com/docs/zh-CN/Red_Hat_Enterprise_Linux/5/html/Global_File_System_2/s1-manage-data-journal.html
4、更改下列文件权限,使任何人没有更改账户权限: chattr +i /etc/passwd chattr +i /etc/shadow chattr +i /etc/group chattr +i /etc/gshadow

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。