I have a FAT filesystem mounted in Linux with the vfat driver.
I want to know how I would be able to read the vfat attributes of a file such as “hidden” and “read-only”.
Based on what I’ve read so far, if I use the stat() glibc command on a file, I would only be getting the file attributes listed here:
http://www.gnu.org/s/libc/manual/html_node/Attribute-Meanings.html#Attribute-Meanings
These don’t contain any vfat attributes however. Can anybody help?
Thanks,
Katsupoy
FAT’s DOS attributes do not map well to the UNIX filesystem model, so Linux’s
vfatdriver does not reflect them.Instead of mounting the filesystem, use mtools to read the filesystem from userspace.
Edit I lied. Apparently the
vfatdriver is able to deal with these DOS attributes, at least as of 2.4.29 (I think; my historical logs don’t go back that far).