Extended file attributes: Difference between revisions

Content deleted Content added
Line 73:
| accessdate=2017-07-11}}</ref>
 
The Linux kernel allows extended attribute to have names of up to 255 bytes and values of up to 64KiB,<ref>{{cite web
as do [[XFS#Extended attributes|XFS]] and [[ReiserFS]],
but [[ext2]]/[[ext3|3]]/[[ext4|4]] and [[btrfs]] impose much smaller limits, requiring all the attributes (names and values) of one file to fit in one "filesystem block" (usually 4 KiB).<ref>{{cite web
| url=https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/limits.h?id=607ca46e97a1b6594b29647d98a32d545c24bdff#n15
| title=linux/include/uapi/linux/limits.h
| date=2012-10-13
| accessdate=2017-07-11}}</ref> The attribute themselves are required to start with one of ''security'', ''system'', ''trusted'', and ''user'' plus a period. This defines the four namespaces of xattrs.<ref>{{man|7|xattr|Linux}}</ref>
| accessdate=2017-07-11}}</ref>
as do [[XFS#Extended attributes|XFS]] and [[ReiserFS]],
but [[ext2]]/[[ext3|3]]/[[ext4|4]] and [[btrfs]] impose much smaller limits, requiring all the attributes (names and values) of one file to fit in one "filesystem block" (usually 4 KiB).
 
Extended attributes can be accessed and modified using the <code>getfattr</code> and <code>setfattr</code> commands from the <code>attr</code> package on most distributions.<ref>{{cite web