Vfat increases file permissions

From: Steve G
Date: Wed Feb 11 2004 - 17:46:06 EST


Hello,

I am wondering about something. Why is it that when I mount a
vfat floppy disk and copy a file to the disk, it becomes
executable?

[root@linux fd_test]# umask 277
[root@linux fd_test]# touch test.txt
[root@linux fd_test]# ls -l test.txt
-r-------- 1 root root 0 Feb 11 17:20 test.txt
[root@linux fd_test]# cp test.txt /mnt/floppy/
[root@linux fd_test]# ls -l /mnt/floppy/test.txt
-rwxrwxrwx 1 root root 0 Feb 11 17:20
/mnt/floppy/test.txt

In the DOS world, not every file is executable. It uses the file
extention to decide if the file is executable. A text file is not
implicitly executable unless it has a .bat file extention.

Is the Linux implementation interpreting something that doesn't
actually exist in the original?

I am concerned about world writeable, executable files existing
on my floppies or USB devices that are formatted vfat. This seems
like a security concern to me.

Thanks,
Steve Grubb

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/