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 11-08-2004, 10:56 AM   #1
paul62
Member
 
Registered: Mar 2004
Location: glenview illinois
Distribution: fedora core 7
Posts: 458

Rep: Reputation: 30
adding permisssions to cdrom so it can be mounted by a user


How can I change the permissions of a cdrom so that a regular user not root can mount a cdrom I would appreciate the help?

http://www.blingo.com/images/friendb...120x52.blu.gif

Last edited by paul62; 12-04-2005 at 08:13 PM.
 
Old 11-08-2004, 11:05 AM   #2
k_bob
Member
 
Registered: Nov 2004
Location: Daytona Beach
Distribution: Slackware, Windows
Posts: 42

Rep: Reputation: 15
try using

chown <user name> -Rf /mnt/cdrom
chmod a+x /mnt/cdrom

or try editing your fstab

mine looks like this:
/dev/cdrom /mnt/cdrom iso9660 noauto,user,uid=1000,gid=100,owner
,ro 0 0

fstab is located in /etc so try vi /etc/fstab
 
Old 11-08-2004, 02:03 PM   #3
Lenard Spencer
Member
 
Registered: Sep 2004
Location: Florida
Distribution: Slackware, Linux from Scratch
Posts: 329

Rep: Reputation: 199Reputation: 199
I was having that problem after I upgraded to the vanilla 2.6.9 kernel, but finally with some help of some our other users here, got it straightened out. Here are my fstab entries:

/dev/hdb /mnt/cdrom auto noauto,user,ro 0 0
/dev/hdd /mnt/cdrom2 auto noauto,user,ro 0 0

This way, they don't try to mount at bootup, and they can be mounted by normal users as well as root. The only caveat is only the user who mounted the volume (or root!) can unmount it, but that's the way it should be.

Hope this helps.
 
Old 11-08-2004, 02:07 PM   #4
ror
Member
 
Registered: May 2004
Distribution: Ubuntu
Posts: 583

Rep: Reputation: 33
If you want anyone to unmount after someone else mounted you can put users instead of user in the fstab.
 
Old 11-08-2004, 03:19 PM   #5
Lenard Spencer
Member
 
Registered: Sep 2004
Location: Florida
Distribution: Slackware, Linux from Scratch
Posts: 329

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by ror
If you want anyone to unmount after someone else mounted you can put users instead of user in the fstab.
Thanks! I hadn't thought about that one.
 
Old 11-08-2004, 07:46 PM   #6
lewkh
Member
 
Registered: Oct 2004
Posts: 69

Rep: Reputation: 15
Normal user mount problem

Quote:
Originally posted by Lenard Spencer
I was having that problem after I upgraded to the vanilla 2.6.9 kernel, but finally with some help of some our other users here, got it straightened out. Here are my fstab entries:

/dev/hdb /mnt/cdrom auto noauto,user,ro 0 0
/dev/hdd /mnt/cdrom2 auto noauto,user,ro 0 0

This way, they don't try to mount at bootup, and they can be mounted by normal users as well as root. The only caveat is only the user who mounted the volume (or root!) can unmount it, but that's the way it should be.

Hope this helps.
I have followed the fstab entries given by you, but I type mount as normal user, it prompts me:- "mount: only root can do that" error message. How can I solve this to let regular user to mount ,umount and eject cd ? And do I let it auto run whenever my cd insertion?
 
Old 11-08-2004, 11:10 PM   #7
Lenard Spencer
Member
 
Registered: Sep 2004
Location: Florida
Distribution: Slackware, Linux from Scratch
Posts: 329

Rep: Reputation: 199Reputation: 199
Re: Normal user mount problem

Quote:
Originally posted by lewkh
I have followed the fstab entries given by you, but I type mount as normal user, it prompts me:- "mount: only root can do that" error message. How can I solve this to let regular user to mount ,umount and eject cd ? And do I let it auto run whenever my cd insertion?
Did you reboot after the changes?
 
Old 11-08-2004, 11:45 PM   #8
eelriver
Member
 
Registered: May 2004
Location: san francisco
Distribution: Slackware 10.2 kernel 2.6.13, Gentoo amd64, Some mish-mash of programs that started with slack 9.0
Posts: 165

Rep: Reputation: 30
Reboot? Slackware only needs to reboot after a kernel change
or something really bad happening.
By the way, fstab is picky. There needs to be a "new line" character at the end of the file. Press enter at the end of the last entry, then save.
And instead of "auto" I use iso9660 as the file system.
 
Old 11-09-2004, 02:22 AM   #9
lewkh
Member
 
Registered: Oct 2004
Posts: 69

Rep: Reputation: 15
Question

It does not work and show the same error message as before. by the way I m using debian linux, does it affect?
Why regular user seems like lacking of privileges to perform mount, umount and eject. error message shows as below:
command: mount /dev/hdc /cdrom
error: mount: only root can do thateject
command: eject
error: eject: unable to open `/dev/hdc'
 
Old 11-09-2004, 02:40 AM   #10
eelriver
Member
 
Registered: May 2004
Location: san francisco
Distribution: Slackware 10.2 kernel 2.6.13, Gentoo amd64, Some mish-mash of programs that started with slack 9.0
Posts: 165

Rep: Reputation: 30
Well, maybe post in the Debian Forum?

Do you have a /mnt/cdrom directory? Or a /cdrom directory? You need to make one or the other. Then write your fstab to read
/dev/hdc /mnt/cdrom iso9660 noauto users 0 0
Also, make sure /dev/hdc is the correct drive.
 
Old 11-09-2004, 02:54 AM   #11
ror
Member
 
Registered: May 2004
Distribution: Ubuntu
Posts: 583

Rep: Reputation: 33
Quote:
Originally posted by eelriver
Well, maybe post in the Debian Forum?
Was gonna say that, but this person wasn't the thread starter.

And this isn't distro specific so no worries.
 
Old 11-09-2004, 04:12 AM   #12
eelriver
Member
 
Registered: May 2004
Location: san francisco
Distribution: Slackware 10.2 kernel 2.6.13, Gentoo amd64, Some mish-mash of programs that started with slack 9.0
Posts: 165

Rep: Reputation: 30
Quote:
Originally posted by ror
Was gonna say that, but this person wasn't the thread starter.

And this isn't distro specific so no worries.
That's why I tried to help.
 
Old 11-09-2004, 04:16 AM   #13
zba78
Member
 
Registered: Oct 2004
Location: Birmingham, England
Distribution: OpenSuSE 10.2
Posts: 50

Rep: Reputation: 15
Re: Re: Normal user mount problem

Quote:
Originally posted by Lenard Spencer
Did you reboot after the changes?
Once any changes are made to fstab just do
Code:
mount -a
and that will remount everything as described in fstab.

oh BTW hello to the community
 
Old 11-09-2004, 06:10 AM   #14
OrphanedLand
LQ Newbie
 
Registered: Dec 2003
Distribution: Slackware
Posts: 26

Rep: Reputation: 15
Hello friend

You can change permission of /dev/hdc and set it to 666. It must be solution for you. Also you can try to add users to 'cdrom' group. So they can mount cdrom device. This is another solution.

I hope that it will help to you...
 
Old 11-09-2004, 04:46 PM   #15
Lenard Spencer
Member
 
Registered: Sep 2004
Location: Florida
Distribution: Slackware, Linux from Scratch
Posts: 329

Rep: Reputation: 199Reputation: 199
Re: Re: Re: Normal user mount problem

Quote:
Originally posted by zba78
Once any changes are made to fstab just do
Code:
mount -a
and that will remount everything as described in fstab.

oh BTW hello to the community
Sorry, I was thinking of something else...
 
  


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
cdrom Mounted but Non Root User Can't Read tortle Slackware 7 11-22-2005 05:33 AM
Cdrom now mounted but still more trouble silentwhispers Mandriva 11 08-04-2004 02:23 AM
root fs is mounted read only after adding new drive PPaladin Linux - Hardware 0 03-02-2004 10:25 AM
games do not see mounted cdrom gonus Linux - Hardware 4 09-27-2002 07:29 PM
CDROM drive can not be mounted fedel Programming 2 08-12-2002 08:50 AM

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

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