From: utzoo!decvax!microsof!uw-beave!black Newsgroups: net.unix-wizards Title: File Protection and Deletion Article-I.D.: uw-beave.236 Posted: Fri Dec 3 10:59:21 1982 Received: Sun Dec 5 04:25:29 1982 I'm suprised that "Unix Wizards" are missing the difference between the three different kinds of file deletion. They are: (1) DeleteBody - i.e. make the file 0 bytes long (2) DeleteEntry - An operation on a directory, not on the file at all. The file is unchanged, but there is one less directory entry which points to it. (3) DeleteFile - Remove the file heading, as well as the body. On unix, (1) is available by doing an open for reading and a close, and requires write permission on the file to be DeleteBodied. (2) is available by doing an Unlink on the directory concerned, and requires write permission on the directory. So Unix does distinguish between these things rather well. (3) is not available at all, on the other hand! I used to use a system where it was available, and it was very handy. For example, if I have my own link to a large system file, and the administrator creates a new version and unlinks the old one, I am unaware of what has happened and continue to hog disk space as well as use an out of date file. If the old file was DeleteFile'd instead, when I next tried to access it I would get "Attempt to Open Deleted File" and would thus be given a warning of what had happened. If Unix was to add DeleteFile, then there is a strong argument for needing different permissions to DeleteBody and to DeleteFile. However, I don't beleive that it makes sense to make DeleteBody different from any other kind of write. Andrew Black