LinuxQuestions.org
Register a domain and help support LQ
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 06-03-2002, 07:30 PM   #1
65_289
Member
 
Registered: May 2002
Distribution: Ubuntu 5.04, Kanotix
Posts: 163

Rep: Reputation: 30
Mounting FAT32 with write permissions?


I have "/dev/hda1 /mnt/win vfat 0 0" in my /etc/fstab file. But I can only write to it as root. How can I mount it so that a regular user can write to it? Thanks.
 
Old 06-03-2002, 07:42 PM   #2
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Try:

/dev/hda1 /mnt/win vfat user,defaults,umask=000 0 0

The user will allow any user to mount the partition and umask=000 will allow anyone to have read, write, and execute permissions.
 
Old 06-03-2002, 10:58 PM   #3
65_289
Member
 
Registered: May 2002
Distribution: Ubuntu 5.04, Kanotix
Posts: 163

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by linuxcool
Try:

/dev/hda1 /mnt/win vfat user,defaults,umask=000 0 0

The user will allow any user to mount the partition and umask=000 will allow anyone to have read, write, and execute permissions.
That didn't work; it still opens the files in read-only mode. Any other ideas?
 
Old 06-04-2002, 03:39 AM   #4
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
First, as root, make sure the partition is unmounted with the command umount /mnt/win.

Edit the /etc/fstab file and change the line to this:

/dev/hda1 /mnt/win vfat noauto,user,defaults,umask=000 0 0

Then log in as a user and run this command:

mount /mnt/win

Then see if you have write permission.
 
Old 06-04-2002, 04:10 AM   #5
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
Quote:
First, as root, make sure the partition is unmounted with the command umount /mnt/win.

Edit the /etc/fstab file and change the line to this:

/dev/hda1 /mnt/win vfat noauto,user,defaults,umask=000 0 0

Then log in as a user and run this command:

mount /mnt/win

Then see if you have write permission.
This SHOULD work fine, but if (for any reason) you want that drive/partition to be mounted for you automatically every time you boot, make sure its "auto" instead of "noauto". For example, the following line will mount the drive/partition for you in read/write mode for all users every time you boot

/dev/hda1 /mnt/win vfat auto,user,defaults,umask=000 0 0
 
Old 06-04-2002, 04:25 AM   #6
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Quote:
Originally posted by shassouneh


This SHOULD work fine, but if (for any reason) you want that drive/partition to be mounted for you automatically every time you boot, make sure its "auto" instead of "noauto". For example, the following line will mount the drive/partition for you in read/write mode for all users every time you boot

/dev/hda1 /mnt/win vfat auto,user,defaults,umask=000 0 0

You don't need to use auto, because the word defaults stands for: rw, suid, dev, exec, auto, nouser, and async. So, this line would auto mount the partition:

/dev/hda1 /mnt/win vfat user,defaults,umask=000 0 0
 
Old 06-04-2002, 11:15 AM   #7
65_289
Member
 
Registered: May 2002
Distribution: Ubuntu 5.04, Kanotix
Posts: 163

Original Poster
Rep: Reputation: 30
Sweet. You guys are full of great knowledge!!
 
Old 06-04-2002, 12:26 PM   #8
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
I think linuxcool is right. I just like using auto since it seems to make more sense to me personally when I look at my fstab file
Sorry, but I think Linuxcool knowsmore about this thanI do


 
Old 06-05-2002, 12:00 AM   #9
Glock Shooter
Member
 
Registered: Jan 2002
Location: Riverside, CA
Distribution: Slackware Convert!!
Posts: 210

Rep: Reputation: 30
I just had the exact same problem, and although your fix works, specifying wich users has full access is a little more safe even if you are the only one it is a good habit. somehting like

dev/hdb1 /mnt/windows vfat defaults,uid=500,gid=500,rw 0 0

specifying your userid and group id (which is in /etc/psswd) so if later on down the line you actually do give someone a login they don't go deleting your windows parttion
 
Old 06-05-2002, 12:16 AM   #10
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
hmm, So how do u find the uid. Do u just look in /etc/psswd ???
 
Old 06-05-2002, 03:08 AM   #11
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Quote:
Originally posted by 65_289
Sweet. You guys are full of great knowledge!!
You're welcome.
 
Old 06-05-2002, 06:44 AM   #12
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
I believe 'top' will give you UID, no no... that just gives PID

Yes, pico /etc/passwd will show you everyone's (and everythings) UID. If it's a user it will be something like '501' or something.
 
Old 06-05-2002, 01:11 PM   #13
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
Thanx for the tip MasterC. I tried what you said and this is what is gave me

Quote:

samer:x:500:100:Samer Hassouneh:/home/samer:/bin/bash
Does this mean I have a uid of 500 and a pid of 100? Also what is the difference between uid and pid?

thanx
 
Old 06-05-2002, 01:37 PM   #14
5amYan
Member
 
Registered: Apr 2002
Location: The District
Distribution: FreeBSD, OBSD maybe Gentoo and Winblech XP
Posts: 291

Rep: Reputation: 30
That would be user (uid= say Jojo Smith) and group (gid= say Accounting).
process (pid) would be how you identify a running process

I've had my windoze partition automounting for a long time. but here it what it looks like.
/dev/hda3 /mnt/windoze vfat auto,rw 0 0

Don't know why I have auto and rw but it works.

Last edited by 5amYan; 06-05-2002 at 01:43 PM.
 
Old 06-05-2002, 03:40 PM   #15
shassouneh
Member
 
Registered: Apr 2001
Location: Cheney, WA
Distribution: SuSE Linux Professional 9.2
Posts: 556

Rep: Reputation: 30
Cool. Thanx
 
  


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
Mounting fat32 drives with read/write access in Fedora a1ex_007 Red Hat 3 03-23-2005 12:38 PM
mounting fat32 /w write rights for users bobbens Linux - Newbie 4 10-05-2004 04:30 AM
Write to Fat32 kurt_angle Linux - Newbie 6 04-12-2004 02:30 AM
FAT32 write class_struggle Linux - Newbie 3 11-26-2003 07:20 AM
it's fat32 why cant I write to it? ampex189 Linux - Newbie 2 10-12-2003 01:43 AM


All times are GMT -5. The time now is 05:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration