Linux Mint 11 is the greatest operating system ever made.

For system help, all hardware / software topics NOTE: use Coders Corner for all coders topics.

Moderators: Krom, Grendel

User avatar
Jeff250
DBB Master
DBB Master
Posts: 6539
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

Re: Linux Mint 11 is the greatest operating system ever made

Post by Jeff250 »

It looks like my Ubuntu machine does this too for removable media.

Code: Select all

$ mount
. . .
/dev/sdc1 on /media/Transcend type vfat (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush)
It looks like showexec is the mount option in question.
man page for mount wrote:showexec
If set, the execute permission bits of the file will be allowed only if the extension part of the name is .EXE, .COM, or .BAT. Not set by default.
It seems a bit funky:

Code: Select all

$ touch foo.exe
$ ls -l foo.exe 
-rwxr-xr-x 1 jeffrey jeffrey 0 2011-12-09 14:58 foo.exe
But:

Code: Select all

$ touch bar
$ ls -l bar
-rw-r--r-- 1 jeffrey jeffrey 0 2011-12-09 14:59 bar
$ mv bar bar.exe
$ ls -l bar.exe 
-rw-r--r-- 1 jeffrey jeffrey 0 2011-12-09 14:59 bar.exe
$ chmod a+x bar.exe
$ ls -l bar.exe
-rw-r--r-- 1 jeffrey jeffrey 0 2011-12-09 14:59 bar.exe
Note that normally, without showexec, everything is executable since FAT32 doesn't support this permission. Here is my permanent FreeDOS partition:

Code: Select all

$ ls -l /dos
total 348
-rwxrwx---  1 root plugdev    711 2009-05-27 22:27 autoexec.bat
-rwxrwx---  1 root plugdev  66945 2006-08-28 22:40 COMMAND.COM
-rwxrwx---  1 root plugdev    826 2009-07-17 19:42 fdconfig.sys
drwxrwx--- 10 root plugdev   4096 2009-07-17 19:25 fdos
-r-xr-x---  1 root plugdev 125960 2003-07-01 13:30 IO.SYS
-rwxrwx---  1 root plugdev  45341 2006-08-18 05:58 KERNEL.SYS
-r-xr-x---  1 root plugdev      6 2009-07-21 08:40 MSDOS.SYS
-rwxrwx---  1 root plugdev  11459 2006-08-11 13:55 SYS.COM
User avatar
snoopy
DBB Benefactor
DBB Benefactor
Posts: 4435
Joined: Thu Sep 02, 1999 2:01 am

Re: Linux Mint 11 is the greatest operating system ever made

Post by snoopy »

In a sense, I'd rather that everything be mounted without execute permissions.

The issue is resolved if the stick is ext formatted, correct? If you're using the stick exclusively as a carrier for portable linux apps, why not format it ext3?
Arch Linux x86-64, Openbox
"We'll just set a new course for that empty region over there, near that blackish, holeish thing. " Zapp Brannigan
User avatar
Jeff250
DBB Master
DBB Master
Posts: 6539
Joined: Sun Sep 05, 1999 2:01 am
Location: ❄️❄️❄️

Re: Linux Mint 11 is the greatest operating system ever made

Post by Jeff250 »

snoopy wrote:The issue is resolved if the stick is ext formatted, correct?
I would imagine. If you have to keep it FAT32 for some reason, if you can stand the stink, you could probably just give any linux applications a *.exe extension.
User avatar
snoopy
DBB Benefactor
DBB Benefactor
Posts: 4435
Joined: Thu Sep 02, 1999 2:01 am

Re: Linux Mint 11 is the greatest operating system ever made

Post by snoopy »

Jeff250 wrote:
snoopy wrote:The issue is resolved if the stick is ext formatted, correct?
I would imagine. If you have to keep it FAT32 for some reason, if you can stand the stink, you could probably just give any linux applications a *.exe extension.
Indeed, assuming my system is configured to mount the sticks in the fashion, which I doubt. It does seem kinda silly to me to do it that way. Why would you flag *.exe files as executable when most of them would be windows binaries and won't run directly in linux anyways?

The only time I've tried to run something off a stick, it was a script which was just as easily put into ~/bin/.
Arch Linux x86-64, Openbox
"We'll just set a new course for that empty region over there, near that blackish, holeish thing. " Zapp Brannigan
Post Reply