LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 11-21-2003, 01:50 PM   #1
ianunderwood
Member
 
Registered: Apr 2003
Location: Edinburgh, Scotland, UK
Distribution: SuSE 9.2, VectorLinux 3.2
Posts: 68

Rep: Reputation: 15
fstab nightmare: how to give users access to ext3 partition?


Hi all

I've tried very hard to find an answer to this, both in the linuxquestions archives and on the web in general. Unfortunately, I've failed so far.

There seem to be lots of posts from people who want to mount their windows partitions who have run into a similar problem: only root has rw access to the partition. It seems that for vfat there are a bunch of relevant options like 'umask=xxx' and 'uid=xxx' which get the job done. These are not valid options for ext3, however (as I'm sure you all know). Options like 'users,rw' are accepted, and allow me to mount/unmount, but I still don't get rw access for users. My own user name is 'iu'. I've made iu the owner of both the partition I'm mounting to *and* the device itself (i.e. /dev/hdd1). This makes no difference.

Given that the directory I'm mounting to is /mnt/montague and the partition I'm mounting is /dev/hdd1, what line do I want in fstab so that any user can both mount and read & write to the partition (or, perhaps better, only 'iu' (500))? Also, if I need to change the attributes of the device and/or folder, what changes must I make?

With genuine thanks

Ian
 
Old 11-21-2003, 02:44 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
So what are the permissions of the mount point i.e. /mnt/montague?

Post output of:
ls -l /mnt/
 
Old 11-21-2003, 03:10 PM   #3
ianunderwood
Member
 
Registered: Apr 2003
Location: Edinburgh, Scotland, UK
Distribution: SuSE 9.2, VectorLinux 3.2
Posts: 68

Original Poster
Rep: Reputation: 15
[iu@localhost iu]$ ls -l /mnt/
total 32
drwxr-xr-x 2 root root 4096 Nov 16 14:55 cdrom
drwxr-xr-x 2 root root 4096 Nov 16 14:55 cdrom1
drwxr-xr-x 2 root root 4096 Nov 21 17:36 data
drwxr-xr-x 2 root root 4096 Nov 16 14:55 floppy
drwxr-xr-x 2 iu iu 4096 Nov 21 17:55 montague
drwxr-xr-x 2 root root 4096 Nov 18 18:25 ramdrive
drwxr-xr-x 2 iu iu 4096 Nov 21 17:55 russell
drwxr-xr-x 2 iu iu 4096 Nov 21 17:55 tarski

Note that I have two other hdd partitions that I didn't mention that I want to mount to /mnt/tarski and /mnt/russell.

When mounted, the owner and group for each of the iu-owned partitions changes to root. I can mount/unmount any of these partitions from the desktop, but not with normal user permissions from the shell. My fstab file is currently as follows.

[iu@localhost iu]$ cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/hdd1 /mnt/montague ext3 users,rw 0 0
/dev/hdd2 /mnt/tarski ext3 users,rw 0 0
/dev/hdd3 /mnt/russell ext3 users,rw 0 0
 
Old 11-21-2003, 05:37 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
Change the fstab to
/dev/hdd1 /mnt/montague ext3 defaults 1 2

You can use the chmod command to allow others to read / write. If you want to mount / unmount then add the user option.

Last edited by michaelk; 11-21-2003 at 05:38 PM.
 
Old 11-21-2003, 05:57 PM   #5
ianunderwood
Member
 
Registered: Apr 2003
Location: Edinburgh, Scotland, UK
Distribution: SuSE 9.2, VectorLinux 3.2
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks

What's the significance/role of the two digits?

Ian
 
Old 11-21-2003, 06:00 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
See man pages for fstab. The last digit is the priority of fsck to autocheck the filesystem at bootup.
 
  


Reply



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
How to give a drive write access to all users in FSTAB? (ext3) jon_k Linux - Software 2 12-19-2004 09:46 PM
Mounting an ext3 partition in fstab. RoaCh Of DisCor Linux - Software 6 07-18-2004 10:50 AM
Give certain users more access to resources tearinox Slackware 2 05-21-2004 02:44 AM
give users access to home dirs jonas73 Linux - Newbie 2 03-16-2004 01:42 AM
How to give users access to installed program? Tiyogi Linux - Software 4 03-08-2004 07:49 AM

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

All times are GMT -5. The time now is 12: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