why can't I make a file undeletable by chowning it to root?
by newbiesforever from LinuxQuestions.org on (#565JD)
I was deleting some files, and wanted to make sure I couldn't delete a certain file by mistake. So I sudo chowned it to root, expecting it to become un-deletable in my user account.
I then selected all the files and deleted them...and the root-owned file went with them?! How did I get away with that? I thought a user couldn't touch root's files and chowning one to root would be a quick way to protect it. I don't want to have permission to delete root's files without sudoing, even though I am the only user on my system; and if I can take permission away, I certainly want to.


I then selected all the files and deleted them...and the root-owned file went with them?! How did I get away with that? I thought a user couldn't touch root's files and chowning one to root would be a quick way to protect it. I don't want to have permission to delete root's files without sudoing, even though I am the only user on my system; and if I can take permission away, I certainly want to.