LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-01-2005, 01:03 AM   #1
landuchi
Member
 
Registered: Oct 2004
Distribution: Debian, Ubuntu
Posts: 74

Rep: Reputation: 15
Problem mounting an ext3 partition


I have a 80 gb hard drive as the third drive on a linux sytem, i was sharing 2 40 gb fat32 partitions but i wanted to try with ext3 so i created a single partition using fdisk.

I formated using : mkfs -V -t ext3 /dev/hdd1 . But when I try to mount this drive using this fstab entry

/dev/hdd1 /mnt/80gb ext3 users,owner,rw,umask=022 0 0

I get: wrong fs, bad option, bad superblock on /dev/hdb1 or too many mounted file systems.

If i mount it using : mount /dev/hdd1 /mnt/80gb/ it mounts it without any problem. When i type mount i get

/dev/hdd1 on /mnt/80gb type ext3 (rw)

Any ideas of what could be wrong ?

Last edited by landuchi; 02-01-2005 at 01:06 AM.
 
Old 02-01-2005, 01:10 AM   #2
puremourning
LQ Newbie
 
Registered: Jan 2005
Posts: 23

Rep: Reputation: 15
only thing i notice is that i think the option for letting users mount it is "user" not "users". just guessing. maybe specifying umask in real octal would be an idea too, like umask=0022
 
Old 02-01-2005, 01:14 AM   #3
landuchi
Member
 
Registered: Oct 2004
Distribution: Debian, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
This is my fstab, everything works like a charm except for the last line...

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/hdc5 /mnt/60gb/a vfat users,owner,rw,umask=022 0 0
/dev/hdc6 /mnt/60gb/b vfat users,owner,rw,umask=022 0 0
/dev/hdc7 /mnt/60gb/c vfat users,owner,rw,umask=022 0 0

/dev/hdd1 /mnt/80gb ext3 users,owner,rw,umask=022 0 0
 
Old 02-01-2005, 09:10 PM   #4
landuchi
Member
 
Registered: Oct 2004
Distribution: Debian, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
For what i have read umask does not apply to ext3 :S.

How can i mount ext3 partitions with rw permision for root and ro permision for the others ?
 
Old 02-02-2005, 08:15 AM   #5
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Well, you could do that just by changing the permissions for that directory:

# chown -R root:root /mnt/80gb
# chmod -R 755 /mnt/80gb
 
Old 02-02-2005, 02:36 PM   #6
landuchi
Member
 
Registered: Oct 2004
Distribution: Debian, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
Yes, thats a very good idea =)

And how should the line in fstab look like , to mount the ext3 partition ?

Thanks
 
Old 02-02-2005, 05:16 PM   #7
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
No problem. The line in fstab would look something like:

/dev/hdd1 /mnt/80gb ext3 user 0 0

Note: Mounting a filesystem with the "rw" option seems redundant, because that is default anyway. The "owner" option is also not needed, since the "user" option is being used. Using both would also be redundant.
 
Old 02-03-2005, 06:45 PM   #8
landuchi
Member
 
Registered: Oct 2004
Distribution: Debian, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
Thanks a lot , it is working beautifully =).

I have 2 more questions, once i change the permissions for /mnt/80gb , am i changing the permisions for all the files and directories inside ?

If i add new files will they have the same permisions, or do i have to repeat the process ?
 
Old 02-03-2005, 06:57 PM   #9
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
You're very welcome. Yes, when you pass the "R" option to chmod or chown, which stands for "recursive", you are also changing the permissions of everything within that directory. And yes, if you add new files, you'll need to change the permissions of those too.
 
Old 02-03-2005, 07:19 PM   #10
landuchi
Member
 
Registered: Oct 2004
Distribution: Debian, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
I will be adding files in a regular basis, and it is posible that other users will add files via ftp too, so i would have to change the permisions every time someone uploads a file in order for the rest of the users be able to see them ?

If that is the case:
When i worked with vfat partitions i could use the umask option to set the permisions, is there a way of doing that with an ext3 partition.
 
Old 02-03-2005, 07:26 PM   #11
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Well whenever you add a file, make sure it already has the permissions you want before putting it in there, and have the users who upload files do the same. When a file is put in that directory, its permissions won't change, they'll be the same as when they were somewhere else.
 
Old 02-03-2005, 07:28 PM   #12
landuchi
Member
 
Registered: Oct 2004
Distribution: Debian, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
The problem is the users who upload use windows 98, there is no file pemisions in win98.
 
Old 02-03-2005, 07:34 PM   #13
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Ah, well I'm not sure what the settings default to if it didn't have permissions in the first place, but my guess is that they default to whatever the actual directory's permissions are...and if that's true, then there's no problem. Just my guess though, make sure you actually check and let me know.
 
Old 02-03-2005, 07:58 PM   #14
landuchi
Member
 
Registered: Oct 2004
Distribution: Debian, Ubuntu
Posts: 74

Original Poster
Rep: Reputation: 15
I am fighting Samba right now, but so far it's beating me up :S

If i ever get it to work, i will gladly tell you about the permisions =)
 
Old 02-03-2005, 07:59 PM   #15
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Heh, alright, well good luck with that man.
 
  


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
Mounting ext3 partition with rw permissions for non-root user ilyushin Linux - Newbie 5 06-27-2005 08:58 AM
Mounting ext3 partition YaAqoB Linux - Newbie 4 05-26-2005 09:44 PM
problem with mounting 2nd HD (ext3) malegria Mandriva 1 12-02-2004 10:50 PM
Mounting an ext3 partition in fstab. RoaCh Of DisCor Linux - Software 6 07-18-2004 11:50 AM
Problem mounting ext3 partition BassJunkie Linux - General 1 02-09-2004 08:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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