Solved

Permissions lost on reboot for reading CD-ROM drive

Posted on 2007-04-08
9
309 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
unable to put logic for reading multiple repo in a single file 4 70
cannot rename datastore 3 96
windows 7 starter missing password 21 99
bash file 10 64
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.…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

749 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