LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-20-2004, 08:37 PM   #1
Apostasy
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu
Posts: 31

Rep: Reputation: 15
Question need help editing fstab and mounting 2nd harddrive


i am on mdk 10 with two hard drives.. both on the Primary IDE channel.. both are ext3 fs and mandrake is installed as the master drive. /dev/hdb1 is the drive i have a question about.. whenever i boot up and log in, the drive mounts ok.. but is only accessible from root.. how do i change this so i don't have to switch to root each time i want to open it... (which is often) I also want write access. here is my fstab:

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hdb1 /mnt/anime ext3 defaults 0 0
/dev/hdc /mnt/cdrom auto user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdd /mnt/cdrom2 auto user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/fd0 /mnt/floppy auto user,iocharset=iso8859-1,sync,codepage=850,noauto,exec 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0

 
Old 06-20-2004, 08:53 PM   #2
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,513

Rep: Reputation: 46
Comment the original line
/dev/hdb1 /mnt/anime ext3 defaults 0 0

and replace by this one:


/dev/hdb1 /mnt/anime ext3 user 0 0

The default option includes nouser.

Last edited by bruno buys; 06-20-2004 at 08:59 PM.
 
Old 06-20-2004, 10:48 PM   #3
Apostasy
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Angry

ok.. i changed fstab to what you recommended.. but i still have no permissions...

[apostasy@localhost apostasy]$ cd /mnt/anime
bash: cd: /mnt/anime: Permission denied
[apostasy@localhost apostasy]$

could it be because my user account has no rights to /mnt/ ??

also i noticed now there is a drive icon on my desktop titled anime.. but upon double click i get this error:
____________________________________
The action associated with "anime" is invalid.

You can configure GNOME to associate a different application or viewer with this file type. Do you want to associate an application or viewer with this file type now?
____________________________________

maybe that helps

Last edited by Apostasy; 06-20-2004 at 10:52 PM.
 
Old 06-20-2004, 11:39 PM   #4
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,513

Rep: Reputation: 46
Did you remember to comment the first line?
 
Old 06-21-2004, 12:26 AM   #5
Apostasy
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
yes, here is my new fstab:

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
#/dev/hdb1 /mnt/anime ext3 defaults 0 0
/dev/hdb1 /mnt/anime ext3 user 0 0
/dev/hdc /mnt/cdrom auto user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdd /mnt/cdrom2 auto user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/fd0 /mnt/floppy auto user,iocharset=iso8859-1,sync,codepage=850,noauto,exec 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0
 
Old 06-21-2004, 02:34 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
The user option allows a user to mount / umount a filesystem. What are the permissions of /mnt/anime?

ls -ld /mnt/anime
 
Old 06-21-2004, 04:11 AM   #7
Apostasy
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
[root@localhost apostasy]# ls -ld /mnt/anime/
drwxr-xr-x 12 apostasy apostasy 4096 Jun 18 21:18 /mnt/anime//
[root@localhost apostasy]#
 
Old 06-21-2004, 12:54 PM   #8
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,513

Rep: Reputation: 46
You are the owner of the dir, you were supposed to be able to write to it. It's odd....
Can you think of something, michael?



drwxr-xr-x 12 apostasy apostasy 4096 Jun 18 21:18 /mnt/anime//

The first section of the line refers to permissions. Like this:

d rwx r-x r-x

The "d" means dir. The next three chars say the owner can: Read, Write and "Xecute" the file. The next three (r-x) say: the group can Read, CANNOT Write (there a - instead of a w), and can Xecute. The next three is likewise.

Got it?
 
Old 06-21-2004, 01:18 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,730

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
It is confusing.

Post the output of the mount comand without any options. This will display how /dev/hdb1 is mounted.
 
Old 06-21-2004, 01:29 PM   #10
baczer
LQ Newbie
 
Registered: Mar 2004
Location: Poland
Distribution: Slackware 9.1, Mandrake 9.0
Posts: 14

Rep: Reputation: 0
You can also try to change the original:
/dev/hdb1 /mnt/anime ext3 user 0 0

by adding "rw" (it allows user to write/read from the device):
/dev/hdb1 /mnt/anime ext3 user,rw 0 0

good luck!
 
Old 06-22-2004, 02:37 PM   #11
Apostasy
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
adding 'rw' to the fstab as noted did not seem to work either.. here is the output of 'mount'

[apostasy@localhost apostasy]$ mount
/dev/hda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /proc/bus/usb type usbdevfs (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,mode=0620)
/dev/hdb1 on /mnt/anime type ext3 (rw,noexec,nosuid,nodev)
[apostasy@localhost apostasy]$


could it be that i can't open /mnt/anime because i can't get to /mnt to begin with?

[apostasy@localhost apostasy]$ cd /mnt
bash: cd: /mnt: Permission denied

i mean.. the permissions could be all and well for the drive.. but wouldn't i need to be able to access /mnt before i can get into hdb1 (/mnt/anime) ?
 
Old 06-22-2004, 03:52 PM   #12
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,513

Rep: Reputation: 46
Do this:
As root, change to / then do
ls -ld /mnt
and post here.
 
Old 06-22-2004, 11:43 PM   #13
Apostasy
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
[root@localhost /]# ls -ld /mnt
drwxr-x--- 6 root adm 4096 Jun 18 02:08 /mnt/
[root@localhost /]#
 
Old 06-23-2004, 09:22 AM   #14
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,513

Rep: Reputation: 46
Hi friend!
The perms show that /mnt is owned by root, and group is adm. The only one who can read-write to it is root (the first three chars in "drwx".. except for the d). adm should be an administrative group with high privileges.

I don't think a normal user (apostasy) would be included in it by default. so, if you haven't edited it so far, you belong to the "others" section of those permissions, and you can't do anything.

As root, you can edit these permissions, to make it writable to everybody. To do this graphically, you should, in konqueror, put a cursor under /mnt and hit alt+enter (or you can right click with the mouse and choose properties). It will display the properties of the dir. You have to edit it, by clicking the entries under "others", choosing read-write mode. Also, choose the option "Apply changes to all subfolders and their content"

Last edited by bruno buys; 06-23-2004 at 09:54 AM.
 
Old 06-23-2004, 09:52 AM   #15
Apostasy
Member
 
Registered: Jun 2004
Location: Wisconsin
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
as far as konqueror goes.. i don't know about that.. i'm using nautilus and alt+enter dosen't work... i've tried to chmod it to 755.. and that works.. but only temporarily.. for some reason it never holds the effect...
chmod -R 755 /mnt/
i've also tried:
chown -R apostasy:apostasy /mnt/
and that also only temporarily works.. after a while if i try to access any of the folders or files under /mnt i get permission denied... i've also just tried adding apostasy to the adm group but that dosen't seem to work either unless it dosen't take immediate effect
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab mounting 2nd harddisk dannyk1 Linux - General 3 11-24-2005 01:15 AM
Accessing 2nd Harddrive D4ve G Linux - Newbie 3 07-19-2005 12:09 AM
Installing linux on 2nd harddrive(dual boot) windows on seperate harddrive lysol Linux - Software 25 08-03-2004 09:33 AM
seeing a 2nd harddrive. keegan Linux - Newbie 2 01-06-2004 02:05 PM
2nd harddrive dilberim82 General 1 05-19-2002 06:07 PM

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

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