LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Files being made executable on Floppies etc (https://www.linuxquestions.org/questions/slackware-14/files-being-made-executable-on-floppies-etc-247827/)

JohnKFT 10-27-2004 04:51 AM

Files being made executable on Floppies etc
 
Any file I move to or create on a floppy or other removable medium is made executable, which is very irritating if only because the icon changes. I am sure I can put something in /etc/fstab to fix this but I am not sure what. Here is my fstab - can anyone advise please?

/dev/hda7 swap swap defaults 0 0
/dev/hda9 / ext3 defaults 1 1
/dev/hda8 /home ext3 defaults 1 2

/dev/hda1 /mnt/win-c vfat rw,exec,user,umask=000 0 0
/dev/hda5 /mnt/win-d vfat rw,exec,user,umask=000 0 0
/dev/hda6 /mnt/mdk ext3 defaults 1 2

devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

/dev/sr0 /mnt/CD iso9660 noauto,user,ro 0 0

/dev/fd0 /mnt/FD auto noauto,user,rw 0 0

/dev/hde1 /mnt/Card vfat noauto,user,rw 0 0

/dev/sda1 /mnt/USB vfat noauto,user,rw 0 0

Azmeen 10-27-2004 06:17 AM

Somehow that is the default behaviour of files on VFAT, FAT and FAT32 on Linux... don't ask me why though :shrug:

Rashkae 10-27-2004 10:50 AM

Re: Files being made executable on Floppies etc
 
Quote:

Originally posted by JohnKFT
Any file I move to or create on a floppy or other removable medium is made executable, which is very irritating if only because the icon changes. I am sure I can put something in /etc/fstab to fix this but I am not sure what. Here is my fstab - can anyone advise please?

/dev/hda7 swap swap defaults 0 0
/dev/hda9 / ext3 defaults 1 1
/dev/hda8 /home ext3 defaults 1 2

/dev/hda1 /mnt/win-c vfat rw,exec,user,umask=000 0 0
/dev/hda5 /mnt/win-d vfat rw,exec,user,umask=000 0 0
/dev/hda6 /mnt/mdk ext3 defaults 1 2

devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

/dev/sr0 /mnt/CD iso9660 noauto,user,ro 0 0

/dev/fd0 /mnt/FD auto noauto,user,rw 0 0

/dev/hde1 /mnt/Card vfat noauto,user,rw 0 0

/dev/sda1 /mnt/USB vfat noauto,user,rw 0 0

Fat / Vfat file systems do *not* have executable permission on individual files. Therefore, when linux mounts the file system, either all file are 'executable', or *no* files are executable. If you prefer no executables, (a good idea for security,) add the noexec option.

dev/fd0 /mnt/FD auto noauto,user,rw,noexec 0 0

Azmeen 10-27-2004 11:19 AM

Re: Re: Files being made executable on Floppies etc
 
Quote:

Originally posted by Rashkae
Fat / Vfat file systems do *not* have executable permission on individual files. Therefore, when linux mounts the file system, either all file are 'executable', or *no* files are executable. If you prefer no executables, (a good idea for security,) add the noexec option.

dev/fd0 /mnt/FD auto noauto,user,rw,noexec 0 0

Hey Rashkae, that's really useful!

Thanks for sharing that info, I learned something new today.

JohnKFT 10-27-2004 04:11 PM

Thanks also from me. Not only do I now know how to fix the problem but I also understand why the problem occurs. You have opened up a whole new understanding of the interaction between these file systems. Thanks also to the chap who invented the internet - a very few years ago it would have taken me longer to walk up the road for a stamp than your helpful reply has taken, and even then I would not have known who to post the question to. Don't we live in exciting times?


All times are GMT -5. The time now is 09:24 AM.