$linuxjunkies
>

attribute

also: file permissions, extended attributes, xattr, permission bits

A property or characteristic of a file or system object that controls access permissions, behavior, or metadata. In Linux, attributes commonly refer to file permissions (read, write, execute) or extended attributes that store additional metadata.

In Linux, attributes are properties attached to files and directories that define how they can be accessed and used. The most common attributes are the traditional permission bits: read (r), write (w), and execute (x) for owner, group, and others.

Beyond basic permissions, Linux supports extended attributes (xattr), which are key-value pairs that store additional metadata. For example, you might use extended attributes to tag files with security labels, backup information, or custom application data using commands like setfattr and getfattr.

Files also have other important attributes like the sticky bit and setuid/setgid bits, which modify how permissions are interpreted. For instance, chmod 4755 script.sh sets the setuid bit, allowing the script to run with the owner's privileges regardless of who executes it.

You can view basic file attributes with ls -l or detailed metadata with stat filename, and modify them using chmod for permissions and chattr for file-specific flags.

Related terms