LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-11-2005, 11:52 PM   #1
darkangel29
Member
 
Registered: Nov 2004
Location: Puerto Rico
Distribution: Ubuntu 10.04
Posts: 121

Rep: Reputation: 15
mount cd/dvd -rom,change permission


I just change to College Linux 2.5 from Fedora Core 2 and i got some problems mounting the cd-rom and the dvd-rom it give me a message about the fstab. This is the corrent status of my fstab
none /proc proc defaults 0 0
none /dev/shm tmps defaults 0 0
none /dev/pts devpts defaults 0 0
/dev/hda3 / ext3 defaults 1 1
/dev/hda4 swap swap defaults 0 0
/dev/hdd /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,user 0 0

/dev/hda1 /mnt/hda1 auto defaults 0 0
/dev/hda3 /mnt/hda3 auto deafaults 0 0
/dev/hda5 /mnt/hda5 auto defaults 0 0
/dev/hdb1 /mnt/hdb1 auto defaults 0 0
none /proc/bus/usb usbdevfs defaults 0 0

/dev/hdc /mnt/dvdr0 isp9660 defaults 0 0


I also need to give full permission to my user account to acess and edit the fat partition, i understand that i do that with the chown command but i have no idea how to use it.Thanx for the help.
 
Old 04-12-2005, 02:59 AM   #2
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
1) What is exactly the error message from mount?

2) If you want to give everyone read/write access (it is FAT so I suppose it is OK) you needs

Code:
chmod a+rw -R /the/location
a+rw means everyone has read and write permission
-R will perform the action recursively.
 
Old 04-12-2005, 03:18 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Re: mount cd/dvd -rom,change permission

Quote:
Originally posted by darkangel29
[snip]
/dev/hdd /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,user 0 0
[snip]

I also need to give full permission to my user account to acess and edit the fat partition, i understand that i do that with the chown command but i have no idea how to use it.Thanx for the help. [/B]
Right? - but the line in my fstab referring to the cdrom drine is:
Code:
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
I have the same distro as you.
In my system, the cdrom is automatically mounted when a disk is inserted. That should solve your problems with giving users access to cd as well.
 
Old 04-12-2005, 06:18 PM   #4
darkangel29
Member
 
Registered: Nov 2004
Location: Puerto Rico
Distribution: Ubuntu 10.04
Posts: 121

Original Poster
Rep: Reputation: 15
I edit the line like the one you have and now when i log has user it give the message that only root can mount the cdrom and when i log has root it says: mount:No medium found
 
Old 04-12-2005, 06:50 PM   #5
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
'mount' behaves this way: only root can mount. For other user, if they login in GUI (says KDE) then the desktop can automount for them. This will not be an issue.

As for the 'no medium found' message, it is interesting. It could well be that the information in the fstab is somehow not correct for your system. Try the following steps:

1) dmesg | grep -i rom

It will clearly show you which device is the CDROM

2) OK, let's say hbd is the cdrom. (/dev/cdrom is usually a soft link to this device)

Now, you can try to mount it via command line by specifying all parameters:

mount -t iso9660 /dev/hdb /media/cdrom

(if /media/cdrom you can mkdir it or just choose other directory)

Let us know if you spot any error message

The idea of this exercise is to verify what you got in fstab is still valid or not.
 
Old 04-13-2005, 08:18 PM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Originally posted by darkangel29
I edit the line like the one you have and now when i log has user it give the message that only root can mount the cdrom and when i log has root it says: mount:No medium found
my fstab was

Code:
 /dev/cdrom   /mnt/cdrom   udf,iso9660   noauto,owner,kudzu,ro 0 0
your fstab should look like...

Code:
 /dev/hdd   /mnt/cdrom   iso9660   noauto,owner,kudzu,ro   0   0
the 1st field is the block special device - in your case, what dmesg claims is your cdrom drive. /dev/hdd should be the secondary slave ide drive, is this right? You should probably check that hdd is really your cdrom - from what you've posted it probably is.

the 2nd field is the mountpoint. check this exists also (cd into /mnt and ls ... if you have more than one cdrom drive, you may want a different mountpoint for this one so you can use them both at the same time... mkdir in /mnt to create /mnt/cdrom2 or something like that.)

the 3rd field is the filesystem that the volume is expected to contain. Don't include file systems not supported by your kernel. See the man pages for fstab for details. iso9660 is a safe bet.

the 4th feild is a set of options.
noauto means that the kernel will not try to mount the volume at boot time. This is fair enough as you don't normally have media in there at boot time.
 
Old 04-13-2005, 08:34 PM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Re: mount cd/dvd -rom,change permission

Something just strck me...

Quote:
Originally posted by darkangel29
I just change to College Linux 2.5 from Fedora Core 2 and i got some problems mounting the cd-rom and the dvd-rom it give me a message about the fstab. This is the corrent status of my fstab
none /proc proc defaults 0 0
none /dev/shm tmps defaults 0 0
none /dev/pts devpts defaults 0 0
/dev/hda3 / ext3 defaults 1 1
/dev/hda4 swap swap defaults 0 0
/dev/hdd /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,user 0 0

/dev/hda1 /mnt/hda1 auto defaults 0 0
/dev/hda3 /mnt/hda3 auto deafaults 0 0
/dev/hda5 /mnt/hda5 auto defaults 0 0
/dev/hdb1 /mnt/hdb1 auto defaults 0 0
none /proc/bus/usb usbdevfs defaults 0 0

/dev/hdc /mnt/dvdr0 isp9660 defaults 0 0


I also need to give full permission to my user account to acess and edit the fat partition, i understand that i do that with the chown command but i have no idea how to use it.Thanx for the help.
1. I do not see an entry for vfat ... which is the dos partition? Anyway - to use "chown" read the man pages for chown ... it is chown <new owner> <file> (for eg. Nethack makes save files called 500player.gz - cp 500player.gz 500player.bak must be done as root and makes the owner of 500player.bak to be root. So when I copy the backup to recreate my save file (dying also kills the sav file) the new save file is also owned by root. For player to be able to use it, I have to do chown player 500player.gz)

Now that's out of the way...
2. I see you have installed a dvd rom drive as the secondary master and want to use the cdrom as secondary slave. Now... did you manually alster the fstab or did you allow kudzu to detect the new configuration and update your fstab for you?

Thing is, your cdrom should be mountable by any user. That's what the "user" in the options means. The only real difference between you and me is the "kudzu" option.

So I think, if you've been through all the other messages, and still no dice, you should ge pedantically, step-by-step through what it is you are actually doing when you say you are mounting the cdrom.
 
Old 04-14-2005, 02:04 AM   #8
jmajor
Member
 
Registered: Nov 2004
Location: Australia
Distribution: Fedora, Ubuntu
Posts: 55
Blog Entries: 2

Rep: Reputation: 17
Hmm...

chown is not the right thing to do to a vfat partition since vfat stores no owner info.
it also stores very little permission info.

work out which partition is your vfat and use a line in fstab like:
/dev/hda2 /win vfat umask=000,users,rw 0 0

'umask=000' works for me.
'users' says let anybody mount / unmount the mount point
'user' (no 's') would say let anybody mount, and the mounting user unmount

Also /dev/hda3 is listed twice in your fstab (once for the root filesystem, and once as /mnt/hda3) This could be generating an error about mounting a filesystem on itself.
 
Old 04-14-2005, 11:21 PM   #9
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
There is that point (vfat does not store file permissions) ... OTOH: there is this bit of the original post:

Quote:
I also need to give full permission to my user account to acess and edit the fat partition, i understand that i do that with the chown command but i have no idea how to use it. Thanx for the help.
"edit" the fat partition as user ???

Giving users the ability to edit a partition seems a bit off colour ... I suspect he wants read/write access to file in the partition as a user ... from this I guess he can see the contents but cannot read or write due to not having permission to do so. (Having tried ... this could be assuming too much of course!)

While partitions may not store owner/group info, mountpoints do. Or perhaps it isn't really a vfat partition - even though it's supposed to be one??? Either way, he'll need to know how to use chown at some point.

Perhaps the original poster can clarify this point.

Last edited by Simon Bridge; 04-17-2005 at 01:00 AM.
 
Old 04-15-2005, 01:02 PM   #10
darkangel29
Member
 
Registered: Nov 2004
Location: Puerto Rico
Distribution: Ubuntu 10.04
Posts: 121

Original Poster
Rep: Reputation: 15
I need permission to read/write in this partition and i only can do so as root and when i log in as user and try to even access it it give me a message that i donot have enough permissions.
I try editing the fstab like jamjor said but it still give me the same message.
 
Old 04-16-2005, 02:24 AM   #11
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
What I need from you is 2 things -
1. your complete fstab - copy and paste from /etc/fstab
2. the output of fdisk -l

... I'll explain:

Some things are puzzling me about your fstab entries - nothing seems to be actually wrong as such, but the entries seem non-standard, and there are odd typos ...

Code:
none 		/proc 		proc 	defaults 	0 0
none 		/dev/shm 	tmps 	defaults 	0 0
none 		/dev/pts 	devpts 	defaults 	0 0
/dev/hda3 	/ 		ext3 	defaults 	1 1
/dev/hda4 	swap 		swap 	defaults 	0 0
/dev/hdd 	/mnt/cdrom 	iso9660 noauto,user,ro 	0 0
/dev/fd0 	/mnt/floppy 	auto 	noauto,user 	0 0
/dev/hda1 	/mnt/hda1 	auto 	defaults 	0 0
/dev/hda3 	/mnt/hda3 	auto 	deafaults 	0 0
/dev/hda5 	/mnt/hda5 	auto 	defaults 	0 0
/dev/hdb1 	/mnt/hdb1 	auto 	defaults 	0 0
none 		/proc/bus/usb 	usbdevfs defaults 	0 0
/dev/hdc 	/mnt/dvdr0 	isp9660	defaults 	0 0
From this you have 2 ide hard drives (hda and hdb) a DVD-ROM (hdc) and a CD-ROM (hdd) drive.
From the spelling mistakes - preserved above - I would guess you have hand transcribed this from your fstab. To avoid confusion, you should always copy and past.

hda is divided into 5(!) partitions
hda1 is mounted at /mnt/hda1 with no fs defined here (auto).
hda2 is not listed - is this an extended partition? Perhaps containing hda4 and 5?
hda3 is listed twice(!) once defining this as the root partition with ext3 fs, second time at mountpoint /mnt/hda3 - since you seem to have a working root partition I wouldn't mess with this ...
hda4 is the swap partition.
hda5 is mounted at /mnt/hda5, again, no fs is specified.

hdb has one partition listed - hdb1, mounted at /mnt/hdb1 with no fs specified.

the DVD rom lives at /mnt/dvdr0 and seems all present and correct.

the CD rom lives at /mnt/cdrom with the correct file system, and options noauto,user,ro

This setup looks odd - definately not a default install. So, to help, we'll probably need to know more. One suspects that the second hard drive and the dvdrom drive have been installed after the OS was put in place(?) But that dosn't explain all those auto fs lines for your hda partitions.

So, what I'd like to see is the fdisk listing for your partitions. For example - in my case...
Code:
[root@indigo-prime sbin]# ./fdisk -l
 
Disk /dev/hda: 4321 MB, 4321787904 bytes
255 heads, 63 sectors/track, 525 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          33      265041   83  Linux
/dev/hda2             400         525     1012095   82  Linux swap
/dev/hda3             128         399     2184840    b  W95 FAT32
 
Partition table entries are not in disk order
 
Disk /dev/hdb: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1      155061    78150712+  83  Linux
[root@indigo-prime sbin]#
You would get a similar list - please paste yours to this forum.

You should also copy and past in your complete fstab like I did ... I'm concened about those typos and what seems to be missing.

For comparison, here is my fstab...

Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/hda3               /usr/dos                vfat    defaults        0 0
/dev/hda2               swap                    swap    defaults        0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
here you can see that hda has 3 partitions, hda1 is the boot partition (which appears absent in your system - note hda1 and hdb1 are not explicitly mentioned), hda2 is a vfat partition, hda3 is the swap partition. The root partition occupies all of the (much larger) hdb1. Since I have less than 4 partitions per device, I have no extended partitions.

/dev/cdrom in the table is actually a symlink to /dev/hdc which is a CDROM/RW/DVD-ROM combo drive. There is also a symlink used by apps called /dev/dvd which also points to /dev/hdc. While I have wondered if this table should include a line which refers to /dev/dvd like this, there is no problem with the existing setup. When I insert the media the appropriate app automatically opens. All this from the default configuration for fedora core 2.

Lastly, just a note about replies ... I'd like you to respond with a pedantic description of what you did. "I altered fstab to look like what you wrote" is insufficient. In each case, if you had done literally that, then it wouldn't work! Since we do not know the inside of your system very well (at all) then we can only tell you the shape of the solution not the actual solution. So, if you tried to use my /dev/cdrom line in fstab, then it wouldn't work. Your reply dosn't actually tell me what you did so I cannot assess if it is what I said that didn't pan out or some misunderstanding of what I said or maybe I wasn't clear enough...
 
  


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
can't mount a dvd on a cd burner/dvd rom drive dr_zayus69 Linux - Hardware 7 12-09-2004 09:56 AM
permission denied! floppy cd-rom dvd-rom HELP! OMEGA-DOOM Linux - Software 17 10-15-2004 06:40 PM
cd-rom and dvd-rom drives won't mount... :-( Ausar Linux - Newbie 12 09-01-2004 03:51 PM
cannot mount cd/dvd rom xone Linux - Hardware 2 04-05-2004 06:09 PM
How to give permission to DVD-ROM? Micro420 Mandriva 19 01-21-2004 02:41 PM

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

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