I'm not sure which is better in terms of performance.
In Ext2/3, files have an owner and an owner-group. There are three sets of permissions for each file, for the owner, owner-group, and anyone else, and the permissions are read, write, and execute. Consult man chmod for more details on this. The owner is stored as a 16-bit integer (this could be 32, not exactly sure). The ls command and other commands lookup the user name/group name by consulting /etc/passwd when it is needed. Such commands display this number if it can't find the user in /etc/passwd. 0 is always root. You would notice this if you stuck a disk in a current Linux system from another Linux system, for example. In NTFS, everything is done by Access Control Entries, which are pretty much just a SID and permission flags. AFAIK (a SID being a 32 or 64-bit integer or something like that). Each file has an owner SID, and then can have one or more additional SIDs. The permission flags of that SID determine what the user can do with that file. The chief difference in Linux is that you can only have an owner, a group-owner and that's it. In NTFS you have an owner and then can assign permissions to as many users as you want. I'm in with the Linux camp in that keeping it simple keeps it actually much more secure, because you can tell at a glance who can access the file and who can't. However, if you need fine grained control (like denying only specific users access) it's a disadvantage and forces applications to implement that functionality. ext2/3 do the superblock and i-node thing, much like classical UNIX. Not too sure of the details on how it works, but it's very efficient. NTFS keeps track of files on disk by way of an MFT. The MFT can grow in size according to the number of files on the disk. I think ext2/3 is limited to maximum number of files depending on the size of the superblock, which you can choose at format time. (The MFT can even get fragmented, ironically it's a file as well) NTFS is journalled, basically meaning the OS writes what it's about to do to the disk to a journal before actually doing it. Then, if it gets interrupted by a power failure, crash, etc. it can make sure the filesystem is consistent and still useable. Ext2 isn't journalled. Ext3 is. Ext3 also has support for extended attributes. Haven't played with these much. Hopefully this provides a good base to do more research. |