LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
From: David Newall <davidn@rebel.net.au>
To : Daryl Tester <dt@picknowl.com.au>
Date: Wed, 26 Apr 2000 18:06:33 +0930 (CST)
Re: Protecting files against power failure
On Wed, 26 Apr 2000, Daryl Tester wrote:
> There is also chattr +S; while the man page says this applies to files,
> I have seen documentation that says it works with directories as well.
I doubt it. That is, I doubt setting +S on a directory would have any
affect on files "within" that directory. Remember that files are uniquely
identified by their inode number, not by any name, and files can (and
regularly do) appear in multiple directories simultaneously. Files can
even appear in *no* directory. (Try this: bash$ exec 5>foo 6<foo; ls -l /
>&5; ls -l foo; rm foo; cat <&6)
I suppose when the kernel opens a file it could look back through the
directory hierarchy, checking for +S in any of the outer directories, and
associate that with the open file descriptor. It doesn't seem likely,
though.
--
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
Return to the LinuxSA Mailing List Information Page