Managing Extended Attributes

Describes what extended attributes are, and the POSIX permissions that you need to manage them.

Extended attributes (referred to as xattrs) allow user applications to associate additional metadata with a regular file or directory. Unlike system-level inode metadata, such as file permissions or modification time, extended attributes are not interpreted by the system but are instead used by applications to store additional information about an inode. Multiple extended attributes can be associated with a single inode. The maximum size allowed for an extended attribute is 64 KB.

An extended attribute is a name-value pair, with a string name and binary value. The extended attribute names are prefixed with a namespace. For example, an xattr named myXattr in the user namespace would be specified as user.myXattr.

Limitations

Permissions for Extended Attributes

The following table lists the permissions (POSIX mode bits or Access Control Expression (ACE)s) you will need to set, retrieve, or modify extended attributes.

To... For directories, you need... For files, you need...
Set extended attributes

Mode bits: write

(OR)

ACE: addchild

Mode bits: write

(OR)

ACE: writefile

Remove extended attributes

Mode bits: write

(OR)

ACE: deletechild

Mode bits: write

(OR)

ACE: writefile

Retrieve extended attributes Mode bits: read

(OR)

ACE: readdir
Mode bits: read

(OR)

ACE: readfile