> hi there
> this just started showing up when i try to mount my cdrom as a user.
> It used to work?
> any ideaswhat might have happened?
> im stuck for an answer.
There three things you need to do.
all three deal with permission.
1. device driver permissions
2. mount permissions
3. directory permissions
1. device driver permissions
/dev/cdrom is usually a link to the scsi or ide cdrom.
scsi looks like: /dev/scd0 (during boot you might see it).
ide: /dev/hdb or /dev/hdc, during the boot up it will be noted.
I'll assume /dev/hdb (which means it is the slave device
on the primary ide controller) but you can confirm which
by issuing this command:
prompt:> ls -l /dev/cdrom
the result on my computer is:
lrwxrwxrwx 1 root root 3 Jun 24 14:57 /dev/cdrom -> hdb
lets check the permission of /dev/hdb
prompt:> ls -l /dev/hdb (mine is)
brw-rw-rw- 1 root disk 3, 64 Sep 7 1994 /dev/hdb
yours probably is:
brw-rw---- 1 root disk 3, 64 Sep 7 1994 /dev/hdb
set the permission on /dev/hdb to rw for all by issuing:
prompt:> chmod +666 /dev/hdb
this will change yours to:
brw-rw-rw- 1 root disk 3, 64 Sep 7 1994 /dev/hdb
2. mount permissions:
cd /etc
using your favorite editor, open fstab (file system table)
go to the line starting with /dev/cdrom. Modify it to look like
/dev/cdrom /mnt/cdrom iso9660 noauto,ro,user,exec 0 0
the first field is the device to use
the second the mount point
the third is the partition type
the fourth is the mount options. These are:
noauto,ro,user,exec
noauto: do not automatically mount at boot.
ro: readonly device
user: a user has permission to mount this file system
exec: programs can be run from this device.
note the seperator is a ',', comma, and no spaces. Spaces end
a field. Save and exit.
3. directory persmissions.
issue the following command.
prompt:> ls -l /mnt
one line will look like:
drwxr-xr-x 2 root root 1024 May 8 11:16 cdrom
if the permissions are not this way then issue the following command:
prompt:> chmod 755 /mnt/cdrom
the 'd' means the file is a directory. The field reads as:
read:write:execute (rwx)
the next three are the owner persmissions. rwx: binary they are 111
or 1x2^2 + 1x2^1 + 1x2^0 = 7
the next three are group permissions. r-x: binary they are 101
or 1x2^2 + 0x2^1 + 1x2^0 = 5
ditto the last field every one else.
By changing to 755 you have given users the read to mount (execute)
the /mnt/cdrom directory.
That should do it. I hope this was not to long an explaination, but
I want you to have a fell for what you are doing before doing it.
Now as to why...
Most multitasking multiuser Operation system do not let users
access the mount command. Linux makes it possible for users
to use the command, but doesn't give the privilage to automatically.
Root has to set the priv on a per device basis.
Steven Howe