1

Why does a file with a permission of 0664/-rw-rw-r-- become 0777/-rwxrwxrwx when copied onto an external hard drive? The external drive is NTFS-formatted - does this matter?

1
  • 1
    NTFS does not honor linux permissions Commented Jun 11, 2021 at 3:04

1 Answer 1

2

It does matter, because the set of attributes and metadata supported for a file vary widely across the various types of filesystems.

Specifically, the file-system permissions (and ownership, for that) you are referring to here originate in the traditional Unix user management framework and are therefore a feature of the filesystems developed for/usually used in Unix/Linux operating systems, like the EXT family of filesystems. They are stored in the inode, a special low-level data block describing a filesystem data structure.

NTFS comes from the Windows world where users and permissions are handled very differently; in particular, NTFS uses access-control lists to determine which user may do what with a certain file (1). So, when an NTFS drive is mounted on a Linux/Unix system, the file system driver has to "translate" the properties of that drive into something understandable to the Linux tools for handling filesystems, which sometimes can mean substituting data that simply isn't present on the actual fileystem with default values.

So, since

  • NTFS has no notion of your local users, and
  • it doesn't control access via ownership/group membership

when copying a file from a Unix/Linux-type file system to an NTFS filesystem will lead to a loss of metadata which is then substituted with a default "everyone can do everything".

See also


(1)and although filesystems used in the Linux world now also support them, they are added "on top" of the traditional permissions, which still form the basis for access handling

1
  • Thanks. I've also done some more readings and found out that the filesystem format (in this case NTFS) is definitely important. Commented Jul 9, 2021 at 7:48

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.