LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-26-2003, 07:40 AM   #1
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
Mount vfat without execute?


I'm using Mandrake 9.0. I need to mount my Windows partiion without execute, I've tried various options in the /etc/fstab file to no avail. When I use Midnight Commander I'd like to play mp3 files by hitting enter but I get "Cannot execute binary file" because the permissions on all the files in that partition are set to read, write and execute by all.
 
Old 04-26-2003, 08:03 PM   #2
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
Midnight Commander is not an mp3 player, it's a file manager. Try playing your mp3 with xmms.
 
Old 04-26-2003, 08:21 PM   #3
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 91
I'm aware Midnight Commander is a file manager, I was using that as an example. When I'm using Midnight Commander, which I do quite often, I sometimes hit enter on a jpeg or an mp3 to remind myself of it's content. I have MC configured so it opens the file with the appropriate program, zgv for jpegs, mpg123 for mp3s, etc. This can be annoying when I have to change each file's permissions first.
I have made an entry to my /etc/rc.d/rc.local file, "chmod -x /mnt/vfatpartition/*" which is a clumsy way of doing it, I'd like to be able to do it with fstab.
Otherwise, I use xmms, playmp3list and mpg123 for mp3 files.
 
Old 04-26-2003, 08:36 PM   #4
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
Ok, the option 'umask=000' in /etc/fstab should do the trick.
 
Old 04-26-2003, 08:49 PM   #5
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 91
Didn't workl Here's my fstab:

/dev/hda5 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
none /mnt/cdrom supermount dev=/dev/hdb,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
/dev/hda1 /mnt/win_c vfat iocharset=iso8859-1,codepage=850,umask=000
/dev/hdc1 /mnt/win_c2 vfat iocharset=iso8859-1,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0 0
 
Old 04-26-2003, 09:19 PM   #6
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Original Poster
Rep: Reputation: 91
Okay, I got it fixed. Here's my new fstag:

/dev/hda5 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
none /mnt/cdrom supermount dev=/dev/hdb,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
/dev/hda1 /mnt/win_c vfat iocharset=iso8859-1,codepage=850,umask=111
/dev/hdc1 /mnt/win_c2 vfat iocharset=iso8859-1,codepage=850,umask=111
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0 0
 
Old 04-26-2003, 09:22 PM   #7
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
The correct syntax is 'umask=000', not 'umask=0 0 0'.
The command 'man fstab' will be of some help with the fstab file layout/options.
 
Old 04-27-2025, 04:51 AM   #8
avalonit
Member
 
Registered: Jun 2008
Posts: 85

Rep: Reputation: 20
Code:
sudo mount -o noexec,fmask=133,dmask=022,uid=MY_USER_UID /dev/sdb1 /mnt/
This will mount with all your files with read/write permission to the given `uid` and read permission to everybody else.
Directories will be read/write/list for `uid` and read/list for everybody else.

Just thought it would be nice to have a precise answer here as it pops up on search.
 
Old 04-27-2025, 09:20 AM   #9
lvm_
Senior Member
 
Registered: Jul 2020
Posts: 1,623

Rep: Reputation: 561Reputation: 561Reputation: 561Reputation: 561Reputation: 561Reputation: 561
Quote:
Originally Posted by SharpyWarpy View Post
When I use Midnight Commander I'd like to play mp3 files by hitting enter but I get "Cannot execute binary file" because the permissions on all the files in that partition are set to read, write and execute by all.
Executable bit affects only unknown files. When mc is configured to open files of a certain type it takes precedence over executable bit.
 
Old 04-27-2025, 09:58 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,644

Rep: Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096
Note, it is a more than 20 years old thread.
 
Old 04-28-2025, 03:57 AM   #11
avalonit
Member
 
Registered: Jun 2008
Posts: 85

Rep: Reputation: 20
Quote:
Originally Posted by pan64 View Post
Note, it is a more than 20 years old thread.
So what did you do that yourself? I see no valid reason and to me that is unhelpful and just noise. As to why I do this, I wrote it down to not have to repeat myself often. FWIW

https://rboci.blogspot.com/2017/12/w...cromancer.html
 
Old 04-28-2025, 04:19 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,644

Rep: Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096
Quote:
Originally Posted by avalonit View Post
So what did you do that yourself? I see no valid reason and to me that is unhelpful and just noise. As to why I do this, I wrote it down to not have to repeat myself often. FWIW

https://rboci.blogspot.com/2017/12/w...cromancer.html
First of all OP is not interested at all.
Next, it was already [not only] answered, solved.
Third, your answer is probably correct, probably works, but definitely not the "ultimate" solution.
Last but not least, your argument about necroposts is a bit outdated, you should probably update it, because you have to put up with someone pointing out that you have reopened a >20 year old thread.
 
Old 04-29-2025, 01:00 AM   #13
avalonit
Member
 
Registered: Jun 2008
Posts: 85

Rep: Reputation: 20
Quote:
Originally Posted by pan64 View Post
First of all OP is not interested at all.
I'm also not interested at all in your comments too, I don't think anybody else is. Just FYI.
Also FYI I will continue to do what I'm doing for the reasons stated above. Feel free to disagree. Cheers.
 
Old 04-29-2025, 08:57 PM   #14
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,362
Blog Entries: 4

Rep: Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178
I've said this before, but – this sort of thing is a prime example of why this forum should have a "time lock." After a certain period, probably measured in months, the thread no longer accepts "replies." You can still link to a post, but you cannot "resurrect" the thread.

Linux changes very, very quickly. Someone who reads a posting might not notice that the previous content is (as in this case) 23 years old, and would have no way to know if it is still relevant. IMHO, the present absence of a "time lock" policy is counterproductive.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot mount vfat bsdpowa Fedora 5 07-28-2005 09:22 AM
Can't mount VFAT oneandoneis2 Linux - Hardware 5 12-18-2004 10:54 PM
vfat execute permission Akuji Slackware 3 08-20-2004 12:38 PM
Mount VFAT files? Intoxicado Linux - Newbie 2 03-23-2003 11:21 AM
mount vfat via modules tunedLow Linux - General 7 06-02-2002 10:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration