• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Q] Unlocking an arbitrary file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: [Q] Unlocking an arbitrary file? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Making an object accessible by both MyDocument AND a custom class
  • Next by Date: Re: [Q] Unlocking an arbitrary file?
  • Previous by thread: Re: [Q] Unlocking an arbitrary file?
  • Next by thread: Re: [Q] Unlocking an arbitrary file?
  • Index(es):
    • Date
    • Thread