的過程就像下面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
這個問題屬於serverfault –