Solved

Permissions lost on reboot for reading CD-ROM drive

Posted on 2007-04-08
9
308 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
  • 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Guacamole cut and paste issue 3 95
awk sed 8 63
Linux Desktop suggestion for Dell Inspiron 3043 13 53
CLI command keep running after close 7 36
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

790 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