用下面这行代码:
[root@localhost 桌面]# chmod o-r /mnt/westosfile1
关闭other 的可读权限
-rw-r-----. 1 xizi root 5 12月 30 00:46 westosfile1
用other的westos用户查看
[westos@localhost ~]$ cat /mnt/westosfile1
cat: /mnt/westosfile1: 权限不够
再加上可读权限
[root@localhost 桌面]# chmod o+r /mnt/westosfile1
-rw-r--r--. 1 xizi root 5 12月 30 00:46 westosfile1
就可以看了
[westos@localhost ~]$ cat /mnt/westosfile1
date
x:对于文件来说的执行权力:是否可以通过文件名称调用文件里的程序,对于目录,是否可以进入目录

w:可写
本文通过实例展示了如何使用chmod命令改变Linux文件的权限,具体操作包括关闭其他用户的读取权限以及重新开启。内容涉及文件的read、write和execute权限,以及不同用户对文件的访问限制。

被折叠的 条评论
为什么被折叠?



