The most popular tool, named ntfs-3g
supports this capability. It's named NTFS attributes.
You should ensure setfattr
(man 1 setfattr) is installed. NTFS attributes constitute two groups of attributes: system.ntfs_attrib
(small-endian) and system.ntfs_attrib_be
(big-endian). It's just for convenient usage.
Each attribute is presented by it's own HEX value (i.e. 0x20
for FILE_ATTRIBUTE_ARCHIVE
). More info and values you can see at the official resource. NTFS attributes group consist of 4 bytes within that you can combine several attributes (Archive + System ...).
Display current NTFS attributes of test.file
:
# Big-Endian
getfattr -h -e hex -n system.ntfs_attrib_be source-file
Set FILE_ATTRIBUTE_ARCHIVE
for test.file
:
# Big-Endian.
setfattr -h -v 0x00000020 -n system.ntfs_attrib_be target-file
# Little-Endian (in this manner in x86 family CPU bytes are stored.
# IMHO it's not very convenient for usage.
setfattr -h -v 0x20000000 -n system.ntfs_attrib target-file