Solved

Permissions lost on reboot for reading CD-ROM drive

Posted on 2007-04-08
9
312 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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 500 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

707 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