Reading the access attributes of directories in Windows
rami.chowdhury at merton.oxon.org
Sat Aug 28 22:17:05 CEST 2010
On Fri, Aug 27, 2010 at 14:16, Nobody <nobody at nowhere.com> wrote:
> On Fri, 27 Aug 2010 13:28:46 +0600, Rami Chowdhury wrote:
>>>> Having this as a separate permission allows normal users to add entries
>>>> to log files but not to erase existing entries.
>>> Unix/Linux systems can do this already.
>> Ooh, I didn't know that -- what combination of permissions would I have to
>> use to get such an effect?
> You can't do it with permissions, you need to use ext2 attributes.
> Specifically, "chattr +a <filename>" will set the "append" attribute,
> which prevents the file being opened for write except in append mode.
> Changing this attribute requires root privilege or the CAP_LINUX_IMMUTABLE
Fascinating, thank you!
"Never assume malice when stupidity will suffice." -- Hanlon's Razor
408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)
More information about the Python-list