LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 06-26-2005, 03:33 AM   #1
ilyushin
LQ Newbie
 
Registered: Jun 2005
Location: India
Distribution: Fedora
Posts: 9

Rep: Reputation: 0
Mounting ext3 partition with rw permissions for non-root user


Hi, I'm quite new to Linux and love it. But I have a small problem. I have both FC1 and FC3 installed and want to use an ext3 partition (rather than a FAT one) to share files between them. It should be in such a way that even a non-root user would be able to write to it. The entry that I added in fstab is this:

/dev/hda14 /mnt/Common1 auto noauto,users,exec,rw 0 0

The problem is that though I was able to mount it, only root has the permissions to write to it. I saw somewhere that this is because ext3 has file ownerships and permissions (while FAT doesn't have them). The uid and gid of the non-root user in both FC1 and FC3 are both 500.

So, what has to be done so that the non-root user in both FC1 and FC3 can mount the partition with rw permissions? Can somebody help me? Thanks.
 
Old 06-26-2005, 03:57 AM   #2
koodoo
Member
 
Registered: Aug 2004
Location: a small village faraway in the mountains
Distribution: Fedora Core 1, Slackware 10.0 | 2.4.26 | custom 2.6.14.2, Slackware 10.2 | 11.0, Slackware64-13
Posts: 345

Rep: Reputation: 32
Try this :
Code:
/dev/hda14      /mnt/Common1     ext3       users,umask=000        0   0
 
Old 06-26-2005, 06:27 AM   #3
ilyushin
LQ Newbie
 
Registered: Jun 2005
Location: India
Distribution: Fedora
Posts: 9

Original Poster
Rep: Reputation: 0
Hi, I gave the entry as you said. But it didn't work. It produced the following error:

mount: wrong fs type, bad option, bad superblock on /dev/hda14,
or too many mounted file systems

I already have an FAT partition mounted using the 'umask=0000' option and it works well, granting rw permission to the non-root user. So, I removed the FAT entry and tried again. Still the problem persists. I then tried 'auto' and 'ext2'instead of 'ext3' as fs option. Still the results are the same. If I remove the 'umask' option, the filesystem mounts alright, but only root will have the write permission as I said before.

It seems as if 'umask' option work with FAT, but not with ext3.

Any ideas??

Thanks.
 
Old 06-26-2005, 10:12 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,926

Rep: Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824Reputation: 1824
You need to change the permissions of the directory. The command is chmod.
http://www.tu-berlin.de/zrz/dienste/...ges/chmod.html

If you want to make the directory read / writeable by all then
chmod 777 /mnt/Common1

Unless you do not want the partition mounted all of the time just use the the following for your fstab
/dev/hda14 /mnt/Common1 ext3 defaults 2 0
 
Old 06-26-2005, 02:39 PM   #5
OneManArmy
Member
 
Registered: Apr 2004
Location: Motherboard
Distribution: Debian GNU/Linux
Posts: 156

Rep: Reputation: 30
Quote:
Originally posted by ilyushin
Hi, I gave the entry as you said. But it didn't work. It produced the following error:

mount: wrong fs type, bad option, bad superblock on /dev/hda14,
or too many mounted file systems

I already have an FAT partition mounted using the 'umask=0000' option and it works well, granting rw permission to the non-root user. So, I removed the FAT entry and tried again. Still the problem persists. I then tried 'auto' and 'ext2'instead of 'ext3' as fs option. Still the results are the same. If I remove the 'umask' option, the filesystem mounts alright, but only root will have the write permission as I said before.

It seems as if 'umask' option work with FAT, but not with ext3.

Any ideas??

Thanks.
Here you go dude

Code:
/dev/hda14 /mnt/Common1 ext3 defaults,user,rw,umask=002,gid=100,auto 0 0
Have fun.
 
Old 06-27-2005, 07:58 AM   #6
ilyushin
LQ Newbie
 
Registered: Jun 2005
Location: India
Distribution: Fedora
Posts: 9

Original Poster
Rep: Reputation: 0
Hi, Thanks a lot everyone! It worked with chmod. Just one doubt. I had tried chmod 777 on this directory before. But Nautilus did'nt allow me to copy a file or create a folder in it. Then I assumed that chmod hadn't worked. Even now the problem remained. I unmounted and remounted the partition and checked again. Still the problem was there. But I was able to do these operations through the command-line (as a normal, non-root user itself). And once this 'inauguration' was done, Nautilus allowed the normal operations. It might seem funny. Is this probably a problem with Nautilus, or is there something else at work here? It appears as if an initial write on the filesystem by a normal user through the command line was necessary.

This happened in FC1. I do not know whether Konqueror or the browsers in FC3 had the same problem. I was'nt able to try it as the filesystem was already written upon and showed no problems after that. I'll try to reformat the partition and attempt it again.

Thanks once again for all your help,
Ilyushin
 
  


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 write permissions on ext3 partition darin3200 Linux - General 4 05-30-2005 08:27 AM
Mounting ext3 partition YaAqoB Linux - Newbie 4 05-26-2005 08:44 PM
Problem mounting and ext3 partition landuchi Linux - Hardware 20 02-07-2005 01:13 AM
Mounting an ext3 partition in fstab. RoaCh Of DisCor Linux - Software 6 07-18-2004 10:50 AM
Problem mounting ext3 partition BassJunkie Linux - General 1 02-09-2004 07:08 AM

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

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