The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: dave@horsfall.org (Dave Horsfall)
Subject: [TUHS] can't protect files from deletion v5,v6, or v7
Date: Thu, 25 May 2017 11:36:02 +1000 (EST)	[thread overview]
Message-ID: <alpine.BSF.2.20.1705251132360.68852@aneurin.horsfall.org> (raw)
In-Reply-To: <CADxT5N6NWDJb-JMKk+PMbY9gQb2PsQpaKKO9XFoMuPQ===_sEA@mail.gmail.com>

On Wed, 24 May 2017, Mark Longridge wrote:

> Ok, I just did an experiment with the rm command and the results 
> surprised me.

[...]

It's always been the case that you need write permission on the parent 
directory; after all, it's what you are actually updating.

> Is there no way to completely protect files from being deleted?

Don't make the parent directory writable...  And if your OS supports file 
attributes I believe there's an "immutable" flag.

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


      parent reply	other threads:[~2017-05-25  1:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-25  0:23 Mark Longridge
2017-05-25  0:28 ` Christian Groessler
2017-05-25  0:48 ` Dan Cross
2017-05-25  0:57   ` Ron Natalie
2017-05-25  1:36 ` Dave Horsfall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.BSF.2.20.1705251132360.68852@aneurin.horsfall.org \
    --to=dave@horsfall.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).