Extended file attributes: Difference between revisions

Content deleted Content added
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 19 templates: hyphenate params (16×);
Line 11:
| work=IBM [[AIX]] V7.2 documentation
| publisher=[[IBM]]
| accessdateaccess-date=2017-07-11}}</ref> The {{mono|getea}},<ref>{{cite web
| url=https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.basetrf1/getea.htm
| title=getea Subroutine
| work=IBM AIX V7.2 documentation: Base Operating System and Extensions, Volume 1
| publisher=IBM
| accessdateaccess-date=2017-07-11}}</ref> {{mono|setea}},<ref>{{cite web
| url=https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.basetrf2/setea.htm
| title=setea Subroutine
| work=IBM AIX V7.2 documentation: Base Operating System and Extensions, Volume 2
| publisher=IBM
| accessdateaccess-date=2017-07-11}}</ref> {{mono|listea}},<ref>{{cite web
| url=https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.basetrf1/listea.htm
| title=listea Subroutine
| work=IBM AIX V7.2 documentation: Base Operating System and Extensions, Volume 1
| publisher=IBM
| accessdateaccess-date=2017-07-11}}</ref> {{mono|statea}},<ref>{{cite web
| url=https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.basetrf2/statea.htm
| title=statea Subroutine
| work=IBM AIX V7.2 documentation: Base Operating System and Extensions, Volume 2
| publisher=IBM
| accessdateaccess-date=2017-07-11}}</ref> and {{mono|removeea}}<ref>{{cite web
| url=https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/com.ibm.aix.basetrf2/removeea.htm
| title=removeea Subroutine
| work=IBM AIX V7.2 documentation: Base Operating System and Extensions, Volume 2
| publisher=IBM
| accessdateaccess-date=2017-07-11}}</ref> APIs support fetching, setting, listing, getting information about, and removing extended attributes.
 
=== OpenBSD ===
Line 52:
| last=Kim
| date=2012-10-05
| accessdateaccess-date=2017-07-11}}</ref> filesystems support extended attributes (abbreviated ''xattr'') when enabled in the kernel configuration. Any regular file or directory may have extended attributes consisting of a name and associated data. The name must be a [[null-terminated string]] prefixed by a [[namespace]] identifier and a dot character. Currently, four namespaces exist: user, trusted, security and system. The user namespace has no restrictions with regard to naming or contents. The system namespace is primarily used by the kernel for [[access control list]]s. The security namespace is used by [[SELinux]], for example.
 
Support for the extended attribute concept from a POSIX.1e draft{{cn|date=July 2020}} that had been withdrawn in 1997 was added to Linux around 2002.<ref>{{cite web
Line 58:
| url=https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/include/?id=1ea864f1c53bc771294e61cf9be43b1d22e78f4c
| date=2002-02-05
| accessdateaccess-date=2017-07-11}}</ref><ref>{{cite web
| url=https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Release_Notes/as-x86/index.html
| title=Red Hat Enterprise Linux AS 3 Release Notes (x86 Edition)
Line 66:
| archive-url=https://web.archive.org/web/20151221173224/https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Release_Notes/as-x86/index.html
| archive-date=2015-12-21
| accessdateaccess-date=2017-07-11}}</ref>
As of 2016, they are not yet in widespread use by user-space Linux programs, but are used by [[Beagle (software)|Beagle]], [[OpenStack#Object Storage .28Swift.29|OpenStack Swift]], [[Dropbox (service)|Dropbox]], [[KDE]]'s semantic metadata framework (Baloo), [[Chromium (web browser)|Chromium]], [[Wget]] and [[cURL]]. A set of recommendations for using them is available at [[freedesktop.org]].<ref>{{cite web
| url=https://www.freedesktop.org/wiki/CommonExtendedAttributes/
| title=Guidelines for extended attributes
| date=2013-05-18
| accessdateaccess-date=2017-07-11}}</ref>
 
The Linux kernel allows extended attribute to have names of up to 255 bytes and values of up to 64 KiB,<ref>{{cite web
Line 77:
| title=linux/include/uapi/linux/limits.h
| date=2012-10-13
| accessdateaccess-date=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). Per POSIX.1e,{{cn|date=July 2020}} the names are required to start with one of ''security'', ''system'', ''trusted'', and ''user'' plus a period. This defines the four namespaces of extended attributes.<ref>{{man|7|xattr|Linux}}</ref>
 
Line 84:
| url=https://savannah.nongnu.org/projects/attr/
| website=[[GNU Savannah]]
| accessdateaccess-date=2017-07-11}}</ref> The APIs are called {{code|getxattr}} and {{code|setxattr}}.
 
===macOS===
Line 103:
| last=Eager
| date=2000-10-28
| accessdateaccess-date=2017-07-11}}</ref> These two bytes are used for other purposes on the FAT32 filesystem, and hence OS/2 extended attributes cannot be stored on this filesystem.
 
Parts of OS/2 version 2.0 and later such as the [[Workplace Shell]] uses several standardized extended attributes (also called ''EAs'') for purposes like identifying the filetype, comments, [[computer icon]]s and keywords about the file.
Line 121:
| date=2016-06-15
| publisher=[[MSDN]]
| accessdateaccess-date=2017-07-11}}</ref>
 
Additionally, [[NTFS]] can store arbitrary-length extended attributes in the form of [[NTFS#Alternate data streams .28ADS.29|alternate data streams]] (ADS), a type of [[Fork (file system)|resource fork]]. Plugins for the file manager [[Total Commander]], like ''NTFS Descriptions'' and ''QuickSearch eXtended'' support filtering the file list by or searching for metadata contained in ADS.<ref>{{cite web|url=https://totalcmd.net/plugring/NTFS_diz.html|title=NTFS Descriptions 1.2.1|website=TotalCmd.net|accessdateaccess-date=16 April 2018}}</ref><ref>{{cite web|url=http://totalcmd.net/plugring/google_like_qs.html|title=QuickSearch eXtended|website=TotalCmd.net|accessdateaccess-date=16 April 2018}}</ref> [[NTFS-3G]] supports mapping ADS to extended attributes in [[Filesystem in Userspace|FUSE]]; it also maps file attributes that way.<ref>{{cite web |title=Extended Attributes |url=https://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/ |website=Tuxera}}</ref>
 
==See also==