08.06.2017 20:58, Carlos E. R. пишет:
Hi,
I'm user 'cer'. To avoid deleting by mistake some files, I changed their ownership to another user:
cer@Isengard:~/Fusion/Videos/Crossing Jordan/Temporada 1> l p*mpeg -rw-r--r-- 1 cer-g root 0 Jun 8 19:50 p.mpeg -rw-r--r-- 1 cer-g root 0 Jun 8 19:50 p2.mpeg -rw-r--r-- 1 cer-g root 0 Jun 8 19:50 p3.mpeg -rw-r--r-- 1 cer-g root 0 Jun 8 19:50 p4.mpeg cer@Isengard:~/Fusion/Videos/Crossing Jordan/Temporada 1> rm p.mpeg rm: remove write-protected regular empty file 'p.mpeg'? n cer@Isengard:~/Fusion/Videos/Crossing Jordan/Temporada 1>
See? 'rm' doubts and asks. However, 'mc' doesn't ask and goes ahead, it happily deletes a file that is not mine.
I thought that the 'w' permission was needed to delete a file, but no. Is there some way I can negate user "cer" permission to delete a file? No, not sticky, it doesn't work.
You are asking wrong question. There is no file property that would magically cause *every program that tries to delete file* to ask you for confirmation. This is behavior of each individual program. Either mc can be configured to ask it or not. You certainly can "negate permission to delete a file" as you were already advised but then you will not able to delete file and you do not like it either nor is it what you want.