Re: all files are executable in vfat

From: Alexander Viro (
Date: Tue Sep 25 2001 - 11:47:46 EST

On Tue, 25 Sep 2001, Nerijus Baliunas wrote:

> On Tue, 25 Sep 2001 12:09:30 -0400 (EDT) Alexander Viro <> wrote:
> AV> > All files are executable in vfat (kernel 2.4.10), although I have
> AV> > /dev/hda1 /mnt/c vfat defaults,user,noexec,umask=0,quiet 0 0
> AV> > in /etc/fstab. They were not in 2.4.7.
> AV>
> AV> Really? Try to execute a binary from there. cp /bin/ls /mnt/c && /mnt/c/ls
> bash: /mnt/c/ls: Permission denied. But:
> $ ls -l ls
> -rwxrwxrwx 1 nerijus nerijus 45724 Rgs 25 18:12 ls

So use the right option for that - umask=111 and there you go.

noexec doesn't (and shouldn't) do anything about mode. Yes, VFAT (along
with explicit mechanism for doing what you want to do) used to have a
bug in noexec handling. And that's a bug - plain and simple. Try it
on any other UNIX _or_ other filesystem on Linux.

-o noexec means "execve() fails regardless of file permissions". If you
want "give all regular files rw-rw-rw-" - VFAT has option for that:

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Sep 30 2001 - 21:00:31 EST