Click to See Complete Forum and Search --> : allowing a user to mount a cd
H. M. Murdock
11-26-2000, 04:03 PM
what do I have to do to allow a user to mount cds?
Thanks,
Murdock
------------------
In 1972, a crack commando unit was sent to prison by a military court for a crime they didn't commit. These men promptly escaped from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune. If you have a problem, if no one else can help, and if you can find them, maybe you can hire the A-Team.
twofoolish2b
11-26-2000, 05:03 PM
Hello, you have to edit your /etc/fstab file. Try putting something like this in there:
/dev/hdd /mnt/cdrom iso9660 defaults,ro,user 0 0
You might have to change the drive letter where I put "/dev/hdd" for you computer. Then you would mount it like mount /mnt/cdrom. That's assuming that you have a directory under /mnt called cdrom. It should work, at least it worked for me under Slackware.
[This message has been edited by twofoolish2b (edited 26 November 2000).]
H. M. Murdock
11-26-2000, 06:56 PM
I tried that, but it spits out an error at me saying i must be root to mount.
Murdock
twofoolish2b
11-26-2000, 08:40 PM
did you edit your /etc/fstab as root?
H. M. Murdock
11-26-2000, 09:06 PM
you cant edit it as a user, you can open it up and look at it, but not write to it unless you have been playing with the permissions on it which is not a very good idea. of course i edited it as root, that is the only way i could have.
Murdock
binaryDigit
11-26-2000, 09:44 PM
the problem may be the permissions of the mount command.on gkrellm you can enable /etc/fstab mounting.this is the only way i can mount without being root.i edited /etc/fstab as root. i don't think that makes a difference. of course it might not hurt to try, but i'd start looking at permissions for the mount command. and now that i went and looked at mine...should be able to execute as normal user. hmmmmm. what about the permissions on the mount point? i'm just guessing now.
------------------
http://home.earthlink.net/~pebice/philLinux.html (http://home.earthlink.net/~pebice)
H. M. Murdock
11-26-2000, 10:01 PM
I looked at the permissions and I am able to use it as a user, but it gives me this message:
mount: must be superuser to use mount
I know i can always su, then mount it, but i want to learn how to do this just so i can.
Murdock
------------------
In 1972, a crack commando unit was sent to prison by a military court for a crime they didn't commit. These men promptly escaped from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune. If you have a problem, if no one else can help, and if you can find them, maybe you can hire the A-Team.
osnap
11-26-2000, 10:52 PM
You need to set the permissions of the device you are trying to mount so your user can use it. Like my devices are my cdromm and the permissions are as follows:
lrwxrwxrwx root root cdrom -> /dev/scd0
lrwxrwxrwx root root cdrom1 -> /dev/scd1
lrwxrwxrwx root root cdrom2 -> /dev/scd1
So set your devices as read/write/executable for all users and you should be able to mount them.
H. M. Murdock
11-26-2000, 10:56 PM
Ok,
I changed the permissions on the /dev/scd0 and /dev/scd1 so everyone could access it and then tried mounting a cd but to no avail, it still gives me:
mount: must be superuser to use mount
I am soooooo stumped.....
Murdock
------------------
In 1972, a crack commando unit was sent to prison by a military court for a crime they didn't commit. These men promptly escaped from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune. If you have a problem, if no one else can help, and if you can find them, maybe you can hire the A-Team.
osnap
11-26-2000, 11:11 PM
Do you have /dev/scd0 and /dev/scd1 in /etc/fstab? Like so:
/dev/scd0 /mnt/cdrom auto user,noauto,nosuid,exec,nodev,ro 0 0
/dev/scd1 /mnt/cdrom2 auto user,noauto,nosuid 0 0
If that doesn't work then try symlinking /dev/cdrom to /dev/scd0 and /dev/cdrom2 to /dev/scd1 and have this in fstab:
/dev/cdrom /mnt/cdrom auto user,noauto,nosuid,exec,nodev,ro 0 0
/dev/cdrom2 /mnt/cdrom2 auto user,noauto,nosuid 0 0
Maybe one of these will work.
H. M. Murdock
11-26-2000, 11:26 PM
I added some of that to my fstab, i didnt have the nosuid,exec,nodev part. I dont think its the permissions because I still get the same error. I am running debian 2.2 with all of the updates, maybe its some sort of "feature" debian puts in as security or something.....
Murdock
teeitup
11-28-2000, 12:48 PM
Letting users mount CDroms is a feature of Linux. The following is taken directly from the manpage for mount.
Remember the user cannot mount the drive BUT they can mount the mount point designated in the fstab file.
---------------------------------------------
ii) When mounting a file system mentioned in fstab, it suffices to give only the device, or only
the mount point.
(iii) Normally, only the superuser can mount file systems. However, when fstab contains the
user option on a line, then anybody can mount the corresponding system.
Thus, given a line
/dev/cdrom /cd iso9660 ro,user,noauto,unhide
any user can mount the iso9660 file system found on his CDROM using the command
mount /dev/cdrom
or
mount /cd
For more details, see fstab(5). Only the user that mounted a filesystem can unmount it again.
If any user should be able to unmount, then use users instead of user in the fstab line.
Good Luck,
------------------
Don't take life to seriously, You'll never get out alive!
-Bugs Bunny-
fuzzy
11-28-2000, 02:00 PM
Yes, this is in no way a debian-thing.
I have used debian (and many distros based on it) for a while now without ever having this problem.
I'm not sure what the deal is yet... can you mount your floppy? Is this cdrom specific?
------------------
Politicians have one thing in common with baby diapers...
They both need to be changed regularly for the same reason.
--Anon.
H. M. Murdock
11-28-2000, 06:49 PM
thanks teeitup.....that was my problem...
i was isuing a mount /dev/cdrom /cdrom instaed of just mount /cdrom
I gave it a try an d voila....it worked...funny how you can miss the obvious things sometimes....
Thanks again,
Murdock
------------------
In 1972, a crack commando unit was sent to prison by a military court for a crime they didn't commit. These men promptly escaped from a maximum security stockade to the Los Angeles underground. Today, still wanted by the government, they survive as soldiers of fortune. If you have a problem, if no one else can help, and if you can find them, maybe you can hire the A-Team.