Messages in this thread |  | | Date | Tue, 25 Sep 2001 12:47:46 -0400 (EDT) | From | Alexander Viro <> | Subject | Re: all files are executable in vfat |
| |
On Tue, 25 Sep 2001, Nerijus Baliunas wrote:
> On Tue, 25 Sep 2001 12:09:30 -0400 (EDT) Alexander Viro <viro@math.psu.edu> 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: umask.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |