LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-03-2004, 12:35 AM   #1
Makaelin
Member
 
Registered: Mar 2004
Posts: 93

Rep: Reputation: 15
Question Mounting CD-ROM as user?


There's been a few threads on this, but I've thus far tried everything and haven't had a bit of luck. I can only mount my CD-ROM and CD-RW drives when logged in as root (that includes playing music CDs and the like, I simply get drive errors. My fstab currently looks like this:

Code:
/dev/hda1        swap             swap        defaults         0   0
/dev/hda2        /                ext3        defaults         1   1
/dev/hdc         /mnt/cdrom       iso9660     noauto,users,ro   0   0
/dev/hdd         /mnt/cdrw        iso9660     noauto,users,ro   0   0
/dev/fd0         /mnt/floppy      auto        noauto,users,rw   0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0

As you can see, /dev/hdc is my CD-ROM (I changed it from being listed as cdrom to hdc, in hopes that might fix something), and /dev/hdd is my CD-RW. The information from ls /proc/ide is as follows:

Code:
drivers  hda  hdc  hdd  ide0  ide1  sis
Going to terminal as root, I can type mount /dev/hdc and it will mount the CD-ROM in that current location normally. CD players can also access either drive normally. Attempting to mount as a user returns a permission error.

I'm at a loss. It looks like everything should be working just fine, but for some reason it isn't. I'm on Slackware-Current with the 2.4.26 kernel. If anyone has any ideas, I'm all ears.
 
Old 09-03-2004, 12:49 AM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Take a look at these: http://www.linuxquestions.org/questi...der=descending

or directly: http://www.linuxquestions.org/questi...tcFfstab+cdrom

and: http://www.linuxquestions.org/questi...ab+cdrom+mount

EDIT: Mmm didn't read carefully what you wrote, the third thread i posted should give you a hint. Also, music cds can't be mounted, you just have to play them.

Last edited by gbonvehi; 09-03-2004 at 01:17 AM.
 
Old 09-03-2004, 02:00 AM   #3
Makaelin
Member
 
Registered: Mar 2004
Posts: 93

Original Poster
Rep: Reputation: 15
Yeah, I know they don't have to be mounted, but they do have to be accessed. Whenever I launch a CD player, it simply gives a Drive Error.

I checked those links, and added the user account to the CDROM group. Still no good. Is it something wrong with my fstab somehow? It seems that setting permissions in fstab would be so you didn't have to use groups for drive permissions?
 
Old 09-03-2004, 02:13 AM   #4
insyte
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 308

Rep: Reputation: 30
edit /etc/group add your user to audio video cdrom

something like

pico /etc/group

audio::17:insyte

video::18:insyte

cdrom::19:insyte
 
Old 09-06-2004, 10:50 PM   #5
Makaelin
Member
 
Registered: Mar 2004
Posts: 93

Original Poster
Rep: Reputation: 15
I tried that, as well. Still no good. This is beginning to get really annoying. If anyone has any other ideas of what may be causing this, I'm all ears. Has anyone else encountered the same issue on Slackware before?
 
Old 09-07-2004, 12:29 AM   #6
sovietpower
Member
 
Registered: Jun 2003
Distribution: Slackware64 14.1 and -current
Posts: 209

Rep: Reputation: 30
My solution to the problem is to sudo the mount, sudo says to edit the file using visudo, but I just joe /etc/sudoers. In the file it will tell you how to set yourself up to sudo things so that you can use them with root permissions but not be root.
 
Old 09-07-2004, 01:40 PM   #7
Lord Zoltar
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 200

Rep: Reputation: 30
I tried the groups trick (adding my regular user to audio,video,cdrom) and that did nothing. If you're getting a drive error wiht the audio cd player, then you are probably having permission problems with whatever dev your /dev/cdrom points to. Mine points to /dev/scd0 so I had to change the permissions of /dev/scd0 like this:

chmod o+r /dev/scd0
but yours might be /dev/hdc... try doing `ls -l /dev/cdrom` to see what your cdrom is pointing at.

done as root user of course. Now I can play audio CDs, but I still can't mount the CDs, which is very confusing to me, because I would think that if I have permission to read an audio cd, i should also have permission to mount a data cd... but I don't


[edit] i should clarify:
as a Regular user i can play audio CDs and read data CDs provided that they were mounted by root. I cannot mount/umount anything.

Last edited by Lord Zoltar; 09-07-2004 at 09:24 PM.
 
Old 09-07-2004, 09:10 PM   #8
lupin_the_3rd
Member
 
Registered: Oct 2003
Location: Memphis, TN
Distribution: Slackware current
Posts: 485

Rep: Reputation: 30
What Lord Z. said plus this, if you're using 2.6 kernel you have to write up some udev rules to assign appropriate permissions to dynamically loaded devices... here's a good resource:

http://www.reactivated.net/udevrules.php

Specifically:

http://www.reactivated.net/udevrules.php#example-cdrom

Permissions are set in /etc/udev/rules.d/udev.rules but sometimes the devices aren't named "cdrom" or "dvd" unless you write up rules to tell udev to do so...



Last edited by lupin_the_3rd; 09-07-2004 at 09:13 PM.
 
Old 09-07-2004, 10:08 PM   #9
catlion
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware 9.1
Posts: 6

Rep: Reputation: 0
Hey!

/dev/hdc /mnt/cdrom iso9660 noauto,users,ro 0 0

Remove all that "s"
 
Old 09-17-2004, 01:48 AM   #10
Makaelin
Member
 
Registered: Mar 2004
Posts: 93

Original Poster
Rep: Reputation: 15
Just wanted to follow up here. I had to get a new hard drive and reinstalled Slackware. To get the CD-ROM working, I added "user" to fstab, as well as typing chmod o+r /dev/hdc in the console, as was suggested. Thanks for the help, guys!
 
Old 09-23-2004, 05:40 PM   #11
gabcast
LQ Newbie
 
Registered: Sep 2004
Location: Venezuela
Posts: 6

Rep: Reputation: 0
mount problem

I canīt have access to my cdrom: this is my fstab file:

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda6 /home ext3 defaults 1 2
/dev/hdd /mnt/cdrom iso9660 umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec 0 0
/dev/hdc /mnt/cdrom2 iso9660 umask=0,user,iocharset=iso8859-15,codepage=850,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,sync,codepage=850 0 0
/dev/hda3 /mnt/windows ntfs umask=0,nls=iso8859-15,ro 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0

I tried this as root:

chmod o+r /dev/hdc
chmod o+r /dev/hdd

But, when I tried to mount , its says:

mount /dev/cdrom2
mount: can't find /dev/cdrom in /etc/fstab or /etc/mtab

mount /dev/cdrom2
mount: can't find /dev/cdrom2 in /etc/fstab or /etc/mtab

Please Help!
 
Old 09-27-2004, 01:31 AM   #12
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
I had the same problem

Here is what I did:

1) in fstab, added the "user" option
2) changed the permissions of "/dev/hdc" so that all users had full access
3) changed the permissions of "/mnt/cdrom" so that all users had full access

I had to do this for my floppy and usb disk also. Initially I added the users to the cdrom/disk
groups, however I think this is redundant when "user" is added to fstab, and it doesn't do any
good unless you modify the group permissions of the device.
ta0kira


PS Sorry, that is regarding OP. Regarding the one above me: your MOUNT point is cdrom2, NOT your device name. You need this:

mount /dev/hdc

-or-

mount /mnt/cdrom2


PS II You cannot mount an audio CD because the file system won't match; audio CDs don't use vfat or ext2 file systems. That is why when you look at an audio CD in Windows, all you see is a tag for each track, which the OS shows out of courtesy. In KDE 3.2.3, if you put in an audio CD and use the file browser with devices frame showing, it gives you several options for looking at the CDs contents. Have not tried this however.

Last edited by ta0kira; 09-27-2004 at 06:23 AM.
 
  


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
CD-Rom mounting.. colabus Linux - Software 11 05-07-2004 11:00 AM
mounting cd-rom dvd-rom and cd-rw antoweb Mandriva 4 12-04-2003 10:37 AM
CD ROM- Mounting petercool Linux - Software 2 08-20-2003 03:14 PM
mounting CD rom as user kudos Slackware 1 04-19-2003 10:00 AM
Mounting CD-Rom RecoilUK Linux - General 7 12-08-2001 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:43 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
Open Source Consulting | Domain Registration