Reading the access attributes of directories in Windows

Nobody nobody at nowhere.com
Fri Aug 27 04:16:49 EDT 2010


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
capability.




More information about the Python-list mailing list