?
Solved

Permissions lost on reboot for reading CD-ROM drive

Posted on 2007-04-08
9
Medium Priority
?
313 Views
Last Modified: 2013-12-16
I am running Suse 10.2 on a HP500 laptop.  Recently I modified the kernel to enable touchpad functionality.  Now the CD-ROM permissions (/dev/hdb) are set for "root" and "disk" but not for me or the group I belong to ("users").  I can restore the correct group or user permissions using chown or chgrp, but the changes are lost when I reboot and permission is denied again.

How can I set the permission to be permanent?  Or do I have to run a script each time I boot to do it for me?
0
Comment
Question by:Bloodrule
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 14

Expert Comment

by:ygoutham
ID: 18874403
edit /etc/fstab and add the options there

/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0

the options can include the "users" option as well
0
 

Author Comment

by:Bloodrule
ID: 18884727
I entered this line to /etc/fstab:

/dev/cdrom   /mnt/cdrom   udf,iso9660   noauto,owner,users,kudzu   0 0

(my default group is "users")

After rebooting /dev/hdb is still inaccessible, showing its permissions as ownership belonging to "root" and group "disk"

Have I omitted something?
0
 
LVL 4

Expert Comment

by:infleadorix
ID: 18890220
Observe the output of the following commands:

# ls -l /dev/cdrom

Assuming that /dev/cdrom is a symlink to /dev/hda, create the /etc/udev/rules.d/99-my.rules file with the the following line in it:

KERNEL="hda", OWNER="username", GROUP="groupname", NAME="%k"

Replace username and groupname above with whatever you desire. Then either reboot the system or run the following commands:

# pkill udevd
# udevstart
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

Author Comment

by:Bloodrule
ID: 18893508
Thanks but still no luck.  I wasn't sure if your suggestion needed to include the " " around the entries or not so I tried both ways.  This is what resulted:

ls -l /dev/cdrom produced:

lrwxrwxrwx 1 root root 3 2007-04-12 07:09 /dev/cdrom->hdb

So I created a new file 99-my.rules in /etc/udev/ with only one line as follows:

KERNEL=hdb, OWNER=peter, GROUP=users, NAME=%k

After rebooting, ls -l /dev/hdb produces:

brw-r----- 1 root disk 3, 64 2007-04-12 07:09 /dev/hdb

And the CDROM is stil inaccessible if I am logged in as "peter" but is available if I am logged in as root.

Can you see if I have made a mistake?
0
 
LVL 4

Expert Comment

by:infleadorix
ID: 18893664
I'm not sure where the 99-my.rules file is supposed to be located in SUSE, but I know it should be in the same directory as the other *.rules file.

Use quotation marks as shown in my example.

I'm not sure what you meant exactly when you said the CD-ROM is inaccessible. Did you mean that you want to be able to mount the drive as regular users? If so, just edit your /etc/fstab file with the following mount options:

noauto,user,ro,exec
0
 

Author Comment

by:Bloodrule
ID: 18893745
I found a number of .rules files in /etc/udev/rules.d/, though there was no file called 99-my.rules.  I assumed that was to be a new file that I was creating.

What I meant was that if I boot as an ordinary user, the CD-ROM device is visible but I get permission denied messages if I try to use it eg play an audio CD.  If I am logged in as root, it works normally.

I'll try again...and thanks!
0
 

Author Comment

by:Bloodrule
ID: 18900887
Still no luck.  Despite making the edits you suggested and rebooting, /dev/hdb is still forbidden unless I am root so I cannot play an audio CD or read/write to/ from a data CD while logged in as an ordinary user.

Hope you have some further advice.
0
 
LVL 4

Accepted Solution

by:
infleadorix earned 1500 total points
ID: 18902108
In that case, you might need to resort to the post initialization script, /etc/rc.d/rc.local. I don't have any SUSE machine here, so I'm not sure if the command I'll tell you (based on Red Hat) will work. Enter the following command:

# which start_udev

If the script exists, add it to the end of the /etc/rc.d/rc.local file, as follows:

/sbin/start_udev
0
 

Author Comment

by:Bloodrule
ID: 18904102
Eventually I solved this as follows:

Yast/Security & Users/User Management/Users/Edit/Existing Local User/Details/Groups and checked the checbox against "Disks".  This gave the necessary permission after logging off and back on.

Thank you for your help.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question