Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
It is possible to run Linux program from fat32?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
GODhack
Guru
Guru


Joined: 26 Jan 2008
Posts: 389
Location: Lithuania

PostPosted: Sat Sep 26, 2009 1:13 pm    Post subject: It is possible to run Linux program from fat32? Reply with quote

Look how strange:
Code:

[vytautas@VytoPC Warsow0.5]$ ./warsow.x86_64
bash: ./warsow.x86_64: Permission denied
[vytautas@VytoPC Warsow0.5]$ ls -lh
total 7.9M
drwxrwxrwx. 3 vytautas vytautas   16K 2009-08-27 20:53 basewsw
drwxrwxrwx. 2 vytautas vytautas   16K 2009-08-25 18:55 docs
drwxrwxrwx. 2 vytautas vytautas   16K 2009-08-27 20:51 libs
-rwxrwxrwx. 1 vytautas vytautas  1.1K 2009-08-27 20:51 warsow
-rwxrwxrwx. 1 vytautas vytautas  912K 2009-08-27 20:51 warsow.i386
-rwxrwxrwx. 1 vytautas vytautas  1.4M 2009-08-27 20:51 warsow_x64.exe
-rwxrwxrwx. 1 vytautas vytautas 1011K 2009-08-27 20:51 warsow.x86_64
-rwxrwxrwx. 1 vytautas vytautas  1.1M 2009-08-27 20:51 warsow_x86.exe
-rwxrwxrwx. 1 vytautas vytautas  138K 2009-08-27 20:51 wsw_portable_x86.exe
-rwxrwxrwx. 1 vytautas vytautas  1.1K 2009-08-27 20:51 wsw_server
-rwxrwxrwx. 1 vytautas vytautas  370K 2009-08-27 20:51 wsw_server.i386
-rwxrwxrwx. 1 vytautas vytautas  623K 2009-08-27 20:51 wsw_server_x64.exe
-rwxrwxrwx. 1 vytautas vytautas  423K 2009-08-27 20:51 wsw_server.x86_64
-rwxrwxrwx. 1 vytautas vytautas  448K 2009-08-27 20:51 wsw_server_x86.exe
-rwxrwxrwx. 1 vytautas vytautas  1.1K 2009-08-27 20:51 wswtv_server
-rwxrwxrwx. 1 vytautas vytautas  355K 2009-08-27 20:51 wswtv_server.i386
-rwxrwxrwx. 1 vytautas vytautas  462K 2009-08-27 20:51 wswtv_server_x64.exe
-rwxrwxrwx. 1 vytautas vytautas  410K 2009-08-27 20:51 wswtv_server.x86_64
-rwxrwxrwx. 1 vytautas vytautas  344K 2009-08-27 20:51 wswtv_server_x86.exe

Just game but still interesting why not work.
_________________
http://www.youtube.com/watch?v=4jtmOZaIvS0
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Sep 26, 2009 1:19 pm    Post subject: Reply with quote

Never tried it myself ... don't have foreign filesystems ... maybe it's mounted with noexec option?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54324
Location: 56N 3W

PostPosted: Sat Sep 26, 2009 1:23 pm    Post subject: Reply with quote

GODhack,

From the file name extension of exe. Its a windows program. Therefore you need to run it in WINE or something like that.
It should run from FAT but as you have discovered, FAT does not support Linux permisions, so you have to fake them at mount time.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
GODhack
Guru
Guru


Joined: 26 Jan 2008
Posts: 389
Location: Lithuania

PostPosted: Sat Sep 26, 2009 1:36 pm    Post subject: Reply with quote

>From the file name extension of exe. Its a windows program.
Nooo....
[vytautas@VytoPC Warsow0.5]$ ./warsow.x86_64 !!!

>FAT does not support Linux permisions, so you have to fake them at mount time.
Hmmm interesting as you see I added some options and now it looks like rwx still something wrong?

>maybe it's mounted with noexec option?
Code:

[root@VytoPC ~]# cat /etc/fstab |grep vfat
/dev/sda4 /media/disk vfat user,rw,umask=000,uid=vytautas,gid=vytautas 0 0

_________________
http://www.youtube.com/watch?v=4jtmOZaIvS0
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Sat Sep 26, 2009 1:39 pm    Post subject: Reply with quote

Run the mount command to see what are the mount options in effect. It's possible Linux mounts foreign filesystems with noexec by default.
Back to top
View user's profile Send private message
GODhack
Guru
Guru


Joined: 26 Jan 2008
Posts: 389
Location: Lithuania

PostPosted: Sat Sep 26, 2009 1:48 pm    Post subject: Reply with quote

You are right:
Code:

/dev/sda4 on /media/disk type vfat (rw,noexec,nosuid,nodev,umask=000,uid=500,gid=500)

_________________
http://www.youtube.com/watch?v=4jtmOZaIvS0
Back to top
View user's profile Send private message
dreadlorde
Apprentice
Apprentice


Joined: 16 Dec 2008
Posts: 243
Location: /adm/timezone/US_Michigan

PostPosted: Sun Sep 27, 2009 9:07 pm    Post subject: Reply with quote

GODhack wrote:

Code:

[root@VytoPC ~]# cat /etc/fstab |grep vfat
/dev/sda4 /media/disk vfat user,rw,umask=000,uid=vytautas,gid=vytautas 0 0

Why did you cat the file, then grep it? Just do
Code:

grep vfat /etc/fstab

_________________
Ludwig von Mises Institute
Quote:
I am not to be a shepherd, I am not to be a grave-digger. No longer will I speak to the people; for the last time I have spoken to the dead.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Mon Sep 28, 2009 9:14 pm    Post subject: Reply with quote

Indeed, there is much too much cat grepping going on.
Not to mention all the superfluous cat awking and cat seding. :lol:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum