gpt4 book ai didi

linux - 为什么我可以删除自己目录下的写保护文件(硬链接(hard link))?

转载 作者:太空狗 更新时间:2023-10-29 11:33:31 25 4
gpt4 key购买 nike

<分区>

过程就像下面的root是一个属主为root的文件:

~$ ln root another_file
~$ ls -l another_file
-rw-r--r-- 2 root root 0 Jan 24 15:48 another_file
~$ rm another_file
rm: remove write-protected regular empty file `another_file'? y
~$ ls -l another_file

但是,这行不通..

~$ ln root another_file
~$ chmod a+w another_file
chmod: changing permissions of `another_file': Operation not permitted

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com