attr - Extended attributes


   Extended  attributes  are  name:value pairs associated permanently with
   files and directories, similar to the  environment  strings  associated
   with  a  process.   An attribute may be defined or undefined.  If it is
   defined, its value may be empty or non-empty.

   Extended attributes are extensions to the normal attributes  which  are
   associated with all inodes in the system (i.e. the stat(2) data).  They
   are often used to provide additional functionality to  a  filesystem  -
   for  example, additional security features such as Access Control Lists
   (ACLs) may be implemented using extended attributes.

   Users with search access to a file or directory may retrieve a list  of
   attribute names defined for that file or directory.

   Extended  attributes are accessed as atomic objects.  Reading retrieves
   the whole value of an attribute and stores it  in  a  buffer.   Writing
   replaces any previous value with the new value.

   Space  consumed  for  extended  attributes  is counted towards the disk
   quotas of the file owner and file group.

   Currently, support for extended attributes is implemented on  Linux  by
   the ext2, ext3, ext4, XFS, JFS and reiserfs filesystems.


   Attribute  names  are  zero-terminated  strings.  The attribute name is
   always specified in the fully qualified namespace.attribute  form,  eg.
   user.mime_type,     trusted.md5sum,     system.posix_acl_access,     or

   The namespace mechanism is used to define different classes of extended
   attributes.   These  different  classes exist for several reasons, e.g.
   the permissions and capabilities  required  for  manipulating  extended
   attributes of one namespace may differ to another.

   Currently  the  security,  system, trusted, and user extended attribute
   classes are defined as described below. Additional classes may be added
   in the future.

   Extended security attributes
   The  security  attribute  namespace is used by kernel security modules,
   such as Security Enhanced Linux.  Read and write access permissions  to
   security  attributes depend on the policy implemented for each security
   attribute by the security module.  When no security module  is  loaded,
   all  processes  have  read  access to extended security attributes, and
   write access is  limited  to  processes  that  have  the  CAP_SYS_ADMIN

   Extended system attributes
   Extended  system  attributes  are  used  by  the kernel to store system
   objects such as Access Control Lists and Capabilities.  Read and  write
   access   permissions   to   system  attributes  depend  on  the  policy
   implemented for each system attribute implemented by filesystems in the

   Trusted extended attributes
   Trusted   extended  attributes  are  visible  and  accessible  only  to
   processes that  have  the  CAP_SYS_ADMIN  capability  (the  super  user
   usually  has  this  capability).   Attributes in this class are used to
   implement mechanisms in user space (i.e.,  outside  the  kernel)  which
   keep  information  in  extended  attributes to which ordinary processes
   should not have access.

   Extended user attributes
   Extended user attributes may be assigned to files and  directories  for
   storing  arbitrary  additional  information  such  as  the  mime  type,
   character set or encoding of a file. The access  permissions  for  user
   attributes are defined by the file permission bits.

   The   file  permission  bits  of  regular  files  and  directories  are
   interpreted differently from the file permission bits of special  files
   and  symbolic  links.  For  regular  files  and  directories  the  file
   permission bits define access to the file's contents, while for  device
   special files they define access to the device described by the special
   file.  The file permissions of symbolic links are not  used  in  access
   checks.  These  differences  would  allow  users  to consume filesystem
   resources in a way not controllable by disk quotas for group  or  world
   writable special files and directories.

   For  this reason, extended user attributes are only allowed for regular
   files and directories,  and  access  to  extended  user  attributes  is
   restricted  to the owner and to users with appropriate capabilities for
   directories with the sticky bit set (see the chmod(1) manual  page  for
   an explanation of Sticky Directories).


   The  kernel  and  the filesystem may place limits on the maximum number
   and size of extended attributes that can be  associated  with  a  file.
   Some  file systems, such as ext2/3 and reiserfs, require the filesystem
   to be mounted with the user_xattr mount option in  order  for  extended
   user attributes to be used.

   In  the  current  ext2,  ext3 and ext4 filesystem implementations, each
   extended attribute must fit on a single filesystem block (1024, 2048 or
   4096  bytes,  depending on the block size specified when the filesystem
   was created).

   In the  XFS  and  reiserfs  filesystem  implementations,  there  is  no
   practical limit on the number or size of extended attributes associated
   with a file, and  the  algorithms  used  to  store  extended  attribute
   information on disk are scalable.

   In  the JFS filesystem implementation, names can be up to 255 bytes and
   values up to 65,535 bytes.


   Since the filesystems on which extended  attributes  are  stored  might
   also  be  used on architectures with a different byte order and machine
   word size, care should  be  taken  to  store  attribute  values  in  an
   architecture independent format.


   Andreas   Gruenbacher,  <>  and  the  SGI  XFS
   development team, <>.


   getfattr(1), setfattr(1).


More Linux Commands

sox(1) - Sound eXchange, the Swiss Army knife of audio manip
Introduction SoX reads and writes audio files in most popular formats and can optionally apply effects to them. It can combine multiple input sources, synthesis

add_wch(3ncurses) - add a complex character and rendition to
add_wch.3ncurses - The add_wch, wadd_wch, mvadd_wch, and mvwadd_wch functions put the complex character wch into the given window at its current position, which

getmsg(2) unimplemented system calls - Linux manual page....
These system calls are not implemented in the Linux kernel. RETURN VALUE These system calls always return -1 and set errno to ENOSYS. NOTES Note that ftime(3),

pam_cracklib(8) - PAM module to check the password against d
This module can be plugged into the password stack of a given application to provide some plug-in strength-checking for passwords. The action of this module is

XtWidgetToApplicationContext(3) - create, destroy, and obtai
The XtCreateApplicationContext function returns an application context, which is an opaque type. Every application must have at least one application context. T

ldap_first_message(3) - Stepping through messages in a resul
These routines are used to step through the messages in a result chain received from ldap_result(3). For search operations, the result chain can contain referra

xdrrec_eof(3) - library routines for external data represent
These routines allow C programmers to describe arbitrary data structures in a machine-independent fashion. Data for remote procedure calls are transmitted using

gammal(3) - (logarithm of the) gamma function (Man Page)....
These functions are deprecated: instead, use either the tgamma(3) or the lgamma(3) functions, as appropriate. For the definition of the Gamma function, see tgam

gpgconf(1) - Modify .gnupg home directories - Linux man page
The gpgconf is a utility to automatically and reasonable safely query and modify configuration files in the .gnupg home directory. It is designed not to be invo

update_panels(3curses) - panel stack extension for curses...
Panels are ncurses(3NCURSES) windows with the added feature of depth. Panel functions allow the use of stacked windows and ensure the proper portions of each wi

dupwin(3ncurses) - create curses windows - Linux man page...
Calling newwin creates and returns a pointer to a new window with the given number of lines and columns. The upper left-hand corner of the window is at line beg

system(3) - execute a shell command - Linux manual page.....
The system() library function uses fork(2) to create a child process that executes the shell command specified in command using execl(3) as follows: execl(/bin/

We can't live, work or learn in freedom unless the software we use is free.