LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-28-2005, 07:23 PM   #1
alex1986
Member
 
Registered: Nov 2005
Location: Ottawa, Canada
Distribution: none yet
Posts: 96

Rep: Reputation: 19
Can't write to Fat32 drive if I'm not root


I am an ULTRA-NEWB. so please don't give me answers like chmod 777 and expect that I know what it will mean. lol.

I know that if it's Microsoft related i should go post in General but i need some dumbied down help.

My friend set my system up for me, told me how to do basic stuff.

I have a dual-boot (Lilo) for XP pro, and linux26 (Slackware, Kernel 2.6.13)

My kernel has been recompiled a few times to accomadate my sound and my AMD 64 processor.

My first problem is: I can't write to the fat32 partition on my drive unless I am root. this wouldn't be a big deal if my vid card didn't suck (RADEON X800 XL, system crashes when I run 2 GUI's and go to switch between them). I need to know how to give my normal user "alex" permission to write to this partition which I have mounted apperantly as read only to /XP/C: it isn't my xp drive, don't worry i know NOT TO WRITE TO NTFS. my ntfs drive is /XP/F:

I plan to post a bunch more of my questions but baby-steps! lol

if you need to know anything about my system just ask.

Alex Chisholm
 
Old 11-28-2005, 07:25 PM   #2
alex1986
Member
 
Registered: Nov 2005
Location: Ottawa, Canada
Distribution: none yet
Posts: 96

Original Poster
Rep: Reputation: 19
i forgot to put this in, here is what my fstab looks like:

/dev/sda2 / ext3 defaults 1 1
/dev/sda1 /boot ext2 defaults 1 2
/dev/sda3 /XP/F: ntfs users,ro,umask=0 1 0
/dev/sda4 /XP/C: vfat defaults 1 0
/dev/dvd /mnt/dvd auto noauto,users,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
 
Old 11-28-2005, 07:30 PM   #3
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
You have 2 options:
1) Enable access for your user only
2) Enable access for all users

For 1) you'd add
Code:
uid=alex,gid=alex
to the appropriate line in /etc/fstab or for 2) you'd add
Code:
umask=0000
to the line in fstab. You can then either reboot the machine or remount the partition manually with
Code:
mount -o remount /mnt/youfat32drive
.



Update:
Code:
/dev/sda4 /XP/C: vfat gid=alex,uid=alex,defaults 1 0
OR
/dev/sda4 /XP/C: vfat umask=0,defaults 1 0

Last edited by tkedwards; 11-28-2005 at 07:32 PM.
 
Old 11-28-2005, 07:50 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,609
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
Here's the problem: the FAT32 disk format does not have Unix permission-bits. This filesystem has no concept of a file "owner," no real security of any kind, and no place to save the information if you did want to set/change it. So, the filesystem driver in Unix has to "fake" something. And basically what it has to come up with is "either/or" ... either the guy who requested the mount is the only one who can use the drive, or everyone can use the drive. It's not a deficiency of Linux, but of a disk-format that is being pressed into a service for which it was never designed.
 
Old 11-28-2005, 07:53 PM   #5
dogpatch
Member
 
Registered: Nov 2005
Location: Central America
Distribution: Mepis, Android
Posts: 490
Blog Entries: 4

Rep: Reputation: 238Reputation: 238Reputation: 238
As root, change the line in fstab for the vfat partition, changing 'defaults' to 'users'. Then, logged in as the proper user, mount the partition. (This could be part of that user's login script).

Alternatively, as root, mount the partition, specifying the user to allow access:
Code:
 mount /dev/sda4 -o uid=alex
(oops, too slow other replies got to you first)

Last edited by dogpatch; 11-28-2005 at 07:56 PM.
 
Old 11-28-2005, 08:06 PM   #6
alex1986
Member
 
Registered: Nov 2005
Location: Ottawa, Canada
Distribution: none yet
Posts: 96

Original Poster
Rep: Reputation: 19
thanks to all... I used the umask=0 in my fstab and that did the trick. I am the only user on the linux side of my system so I don't have to worry about another linux user getting in. although, would the umask=0 create any network security issues?
 
Old 11-28-2005, 08:44 PM   #7
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Quote:
although, would the umask=0 create any network security issues?
No. Not unless you shared that drive using samba, but if you did that you would restict it to only authorised users in the samba config anyway.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
User can't write mounted fat32 drive? ExoZagNoid Ubuntu 4 06-09-2005 08:05 PM
External USB drive -- only WRITE as root 1kyle Linux - Hardware 0 08-03-2004 10:00 AM
FAT32 shared drive lacks user write access abijah Linux - General 2 06-28-2004 06:28 PM
usb pen drive - only root can write? BrianK Linux - Newbie 3 01-29-2004 12:50 AM
Only root can access FAT32 drive? morrolan Linux - Software 2 01-06-2004 08:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:18 AM.

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