LinuxQuestions.org
Help answer threads with 0 replies.
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 12-05-2008, 12:30 AM   #1
greengrocer
Member
 
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Rep: Reputation: 37
fstab - FAT32 partition always mounts read only


Hey people,

Can anybody help me with my fstab problem?

Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda6
UUID=726a5d8f-ba42-4bba-8313-b11c8f55c1a5 /               ext3    relatime,errors=remount-ro 0       1
# /dev/sda5
UUID=1ee61ef6-5d0c-42c8-9f77-1b1f33a383cc none            swap    sw              0       0
#
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
#
/dev/sda7       /media/sda7     vfat    user,auto,exec,rw,sync 0      0
The sda7 device always mounts read only. I am not sure why?

Can anyone see what is wrong here?

Using Ubuntu 8.10 (intrepid ibex)

Regards,
greenie
 
Old 12-05-2008, 01:20 AM   #2
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Rep: Reputation: 37
Quote:
Originally Posted by greengrocer View Post
Hey people,

Can anybody help me with my fstab problem?

Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda6
UUID=726a5d8f-ba42-4bba-8313-b11c8f55c1a5 /               ext3    relatime,errors=remount-ro 0       1
# /dev/sda5
UUID=1ee61ef6-5d0c-42c8-9f77-1b1f33a383cc none            swap    sw              0       0
#
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
#
/dev/sda7       /media/sda7     vfat    user,auto,exec,rw,sync 0      0
The sda7 device always mounts read only. I am not sure why?

Can anyone see what is wrong here?

Using Ubuntu 8.10 (intrepid ibex)

Regards,
greenie
I think that is your CD WRITER.
 
Old 12-05-2008, 01:26 AM   #3
greengrocer
Member
 
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Original Poster
Rep: Reputation: 37
The CD drive is /dev/scd0

I am having trouble with /dev/sda7 which is a FAT32 partition. I can write files to it as root, but not as user.
 
Old 12-05-2008, 01:44 AM   #4
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Rep: Reputation: 37
Quote:
Originally Posted by greengrocer View Post
The CD drive is /dev/scd0

I am having trouble with /dev/sda7 which is a FAT32 partition. I can write files to it as root, but not as user.
that is why I am confused it is mount in /media/

how did you mount it?

can you give me your df-h
and fdisk -l

Last edited by RMLinux; 12-05-2008 at 01:56 AM.
 
Old 12-05-2008, 01:56 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,037

Rep: Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912
Quote:
Originally Posted by greengrocer View Post
I am having trouble with /dev/sda7 which is a FAT32 partition. I can write files to it as root, but not as user.
If root can write to it it isn't read only.
Check permission on that mount point.
 
Old 12-05-2008, 02:25 AM   #6
thecarpy
Member
 
Registered: Apr 2005
Location: France
Distribution: Debian
Posts: 125

Rep: Reputation: 19
If you specify the option "user", then the user who mounts the partition is the owner of all files on that partition ... automounter is run as root!

What you need to do is set a uid ...

I use: uid=1000,gid=1000,umask=007

I use umask to remove world+dog read/write privileges.
 
Old 12-05-2008, 03:13 AM   #7
greengrocer
Member
 
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Original Poster
Rep: Reputation: 37
I read the man page for mount again, two things just stood out to me:

Quote:
user
Allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

users
Allow every user to mount and unmount the file system. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).
Ahhhh, maybe I was supposed to have 'users' not 'user' because the two will result in entirely different behaviour. I will try it when I am back in front of that computer.

Many thanks thecarpy, I think you may be onto something there

Cheers,
Greenie
 
Old 12-05-2008, 03:19 AM   #8
greengrocer
Member
 
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by RMLinux View Post
that is why I am confused it is mount in /media/

how did you mount it?

can you give me your df-h
and fdisk -l
Hey RM,

Yeah I always mount everything to /media, and the reason why is that I find pretty much everything else in the Ubuntu world automatically mounts to there, so just to keep everything in one place, I just set everything to mount into /media.

I'd prefer to mount everything under /mnt but nothing in Ubuntu mounts there by default. Its a bad habit Ubuntu has got me doing I'm afraid.
 
Old 12-05-2008, 08:03 PM   #9
greengrocer
Member
 
Registered: Aug 2005
Distribution: Ubuntu Intrepid and Meerkat, formerly used Debian 3.1 (Sarge) with Gnome Desktop
Posts: 353

Original Poster
Rep: Reputation: 37
Wink

Quote:
Originally Posted by thecarpy View Post
If you specify the option "user", then the user who mounts the partition is the owner of all files on that partition ... automounter is run as root!

What you need to do is set a uid ...

I use: uid=1000,gid=1000,umask=007

I use umask to remove world+dog read/write privileges.
Thanks thecarpy,

Your solution was correct. This is what the line had to be:

Code:
/dev/sda7       /media/sda7     vfat    auto,sync,rw,uid-1000,gid=1000,umask=007   0   0
Thank you, thank you, thank you.
 
Old 12-08-2008, 05:38 AM   #10
thecarpy
Member
 
Registered: Apr 2005
Location: France
Distribution: Debian
Posts: 125

Rep: Reputation: 19
There is a typo:

Code:
/dev/sda7       /media/sda7     vfat    auto,sync,rw,uid-1000,gid=1000,umask=007   0   0
should be
Code:
/dev/sda7       /media/sda7     vfat    auto,sync,rw,uid=1000,gid=1000,umask=007   0   0
but setting gid only the should work as well ... ;-)
 
  


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
Mounted read-write Fat32 partition suddenly becomes read-only?? hohead Linux - General 8 04-05-2007 01:17 PM
fstab mounts Windows share but read only. Charlie Spencer Linux - Newbie 19 07-26-2006 12:46 PM
Formating a FAT32 partition, putting the partition correctly into FSTAB, and more. squall14716 Linux - General 14 10-27-2003 11:16 PM
Compiled RH7.3 to read WinXP NTFS partition, mounts in Console, but can't mount fstab BlackDogg Linux - Newbie 20 08-06-2002 12:15 AM
fstab, mounting a fat32 partition, need help w/ ownership and all that mackstann Linux - General 2 10-15-2001 03:37 PM


All times are GMT -5. The time now is 07:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration