Re: [Q] Unlocking an arbitrary file?
Re: [Q] Unlocking an arbitrary file?
- Subject: Re: [Q] Unlocking an arbitrary file?
- From: Sherm Pendley <email@hidden>
- Date: Wed, 25 Sep 2002 02:14:20 -0400
On Wednesday, September 25, 2002, at 01:43 AM, Charles Srstka wrote:
to be able to delete everything in it, every time, no matter what. Even
chowning the file to root:wheel and chmodding the file to 000 doesn't
stop the Trash from dutifully zapping it when I choose Empty Trash.
The ability to delete a file is not governed by the permissions or
ownership of that file, but rather by the permissions and ownership of
the directory from which it's being deleted. This isn't very intuitive
at first, but it makes sense after some thought.
A directory is essentially a list of files. Deleting a file changes the
directory, but it doesn't necessarily alter or delete the file's
contents. For example, if there are hard links to the file from other
directories, the file's contents won't be deleted, just the affected
directory entry. That's why file deletions are governed according to the
enclosing directory's permissions; it's the directory that's changed,
not the file.
sherm--
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.