Skip to main content
added 42 characters in body
Source Link
Roger Jones
  • 1.5k
  • 8
  • 14

The files in the /boot directory are from the first partition of the SD card that's been mounted there during the boot process. Because the first partition is formatted as a FAT filesystem the files don't have the same meta-data available as when using, for example, the ext4 filesystem.

The mount command used to mount the partition has to somehow map the meta-data expected by the underlying filesystem from the mounted filesystem and this ends up with some of the flags being meaningless or mapped to different meanings. In your example, the File Allocation TablesFile Allocation Tables on the SD card has no concept of a file being "executable" (I believe that actual vFAT systems look at the file extension to figure out if it's executable or not: it's a function of the OS, not the filesystem) so all the files will have the executable bit set when mounted.

There are other features missing in "vFAT" that can lead to odd behaviour when being mounted, such as no UID/GID; coarser timestamps that start at a different Epoch and restricted filenames for example. You can adjust how some of these are "handled", look at some of the options listed under the "Mount options for fat" section in the man 8 mount pages.

See also https://en.wikipedia.org/wiki/File_system_permissions#Operating_system_variations

The files in the /boot directory are from the first partition of the SD card that's been mounted there during the boot process. Because the first partition is formatted as a FAT filesystem the files don't have the same meta-data available as when using, for example, the ext4 filesystem.

The mount command used to mount the partition has to somehow map the meta-data expected by the underlying filesystem from the mounted filesystem and this ends up with some of the flags being meaningless or mapped to different meanings. In your example, the File Allocation Tables on the SD card has no concept of a file being "executable" (I believe that actual vFAT systems look at the file extension to figure out if it's executable or not: it's a function of the OS, not the filesystem) so all the files will have the executable bit set when mounted.

There are other features missing in "vFAT" that can lead to odd behaviour when being mounted, such as no UID/GID; coarser timestamps that start at a different Epoch and restricted filenames for example. You can adjust how some of these are "handled", look at some of the options listed under the "Mount options for fat" section in the man 8 mount pages.

See also https://en.wikipedia.org/wiki/File_system_permissions#Operating_system_variations

The files in the /boot directory are from the first partition of the SD card that's been mounted there during the boot process. Because the first partition is formatted as a FAT filesystem the files don't have the same meta-data available as when using, for example, the ext4 filesystem.

The mount command used to mount the partition has to somehow map the meta-data expected by the underlying filesystem from the mounted filesystem and this ends up with some of the flags being meaningless or mapped to different meanings. In your example, the File Allocation Tables on the SD card has no concept of a file being "executable" (I believe that actual vFAT systems look at the file extension to figure out if it's executable or not: it's a function of the OS, not the filesystem) so all the files will have the executable bit set when mounted.

There are other features missing in "vFAT" that can lead to odd behaviour when being mounted, such as no UID/GID; coarser timestamps that start at a different Epoch and restricted filenames for example. You can adjust how some of these are "handled", look at some of the options listed under the "Mount options for fat" section in the man 8 mount pages.

See also https://en.wikipedia.org/wiki/File_system_permissions#Operating_system_variations

Source Link
Roger Jones
  • 1.5k
  • 8
  • 14

The files in the /boot directory are from the first partition of the SD card that's been mounted there during the boot process. Because the first partition is formatted as a FAT filesystem the files don't have the same meta-data available as when using, for example, the ext4 filesystem.

The mount command used to mount the partition has to somehow map the meta-data expected by the underlying filesystem from the mounted filesystem and this ends up with some of the flags being meaningless or mapped to different meanings. In your example, the File Allocation Tables on the SD card has no concept of a file being "executable" (I believe that actual vFAT systems look at the file extension to figure out if it's executable or not: it's a function of the OS, not the filesystem) so all the files will have the executable bit set when mounted.

There are other features missing in "vFAT" that can lead to odd behaviour when being mounted, such as no UID/GID; coarser timestamps that start at a different Epoch and restricted filenames for example. You can adjust how some of these are "handled", look at some of the options listed under the "Mount options for fat" section in the man 8 mount pages.

See also https://en.wikipedia.org/wiki/File_system_permissions#Operating_system_variations