首页 > 解决方案 > 有没有办法删除所有者对 macOS 中文件的读取权限?

问题描述

有什么办法可以取消所有者在 macOS 中读取文件的权限?我知道没有理由这样做,但我必须上学,而且我在任何地方都找不到答案。删除我的写权限可以正常工作,但是当我尝试删除我的读取权限时,它会自动给我我的读写权限。正如您在控制台中看到的那样,当我使用 chmod -v -v (额外详细)时,它显示了应该更改为的正确权限,但随后在检查时它们并没有更改为...

thijs@Thijss-MacBook-Air-2 week6 % ls -l
total 16
-rw----r--  1 thijs  staff  12 Oct 11 21:10 greeting.txt
-rw-r--r--  1 thijs  staff   0 Oct 11 21:10 hello.txt
-rw-------  1 thijs  staff  15 Oct 11 21:11 weather.txt
thijs@Thijss-MacBook-Air-2 week6 % chmod -v -v u-w weather.txt 
weather.txt: 0100600 [-rw------- ] -> 0100400 [-r-------- ]
thijs@Thijss-MacBook-Air-2 week6 % ls -l 
total 16
-rw----r--  1 thijs  staff  12 Oct 11 21:10 greeting.txt
-rw-r--r--  1 thijs  staff   0 Oct 11 21:10 hello.txt
-r--------  1 thijs  staff  15 Oct 11 21:11 weather.txt
thijs@Thijss-MacBook-Air-2 week6 % chmod -v -v u-r weather.txt 
weather.txt: 0100400 [-r-------- ] -> 0100000 [---------- ]
thijs@Thijss-MacBook-Air-2 week6 % ls -l
total 16
-rw----r--  1 thijs  staff  12 Oct 11 21:10 greeting.txt
-rw-r--r--  1 thijs  staff   0 Oct 11 21:10 hello.txt
-rw-------  1 thijs  staff  15 Oct 11 21:11 weather.txt

标签: macosterminalfile-permissionschmodmacos-big-sur

解决方案


推荐阅读