LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 05-04-2008, 03:41 AM   #1
pumpump
LQ Newbie
 
Registered: May 2008
Location: Singapore
Distribution: Slackware, Ubuntu
Posts: 9

Rep: Reputation: 0
Question How to set permission of DVD mounted by udev


I am using Slackware 12.1, KDE 3.5.9, udev 118, hal 0.5.10.

My PC has 1 IDE ATAPI DVD-ROM drive under /dev/hdb, and 1 SATA DVD writer under /dev/sr0. Both are not in /etc/fstab.

When I try to put a DVD-R into my DVD-ROM drive, KDE can auto-mount it to /media/<DVD LABEL>. The /.hal-mtab under /media shows:

Quote:
/dev/hdb 1000 0 udf nosuid,nodev,uhelper=hal,uid=1000 /media/<DVD LABEL>
But the directory permission is 000
Quote:
d--------- 2 me root 172 2008-04-14 23:25 /media/<DVD LABEL>
Same thing for the DVD writer.

I tried to look through the /etc/udev/rules.d/, but was not sure which rule mounts it to /media/<DISK LABEL>, or sets the permission. I tried to add my own rule to /etc/udev/rules.d/10-local.rules with the following entries:
Quote:
SUBSYSTEM=="block", KERNEL=="hdb", SYMLINK+="dvd", GROUP="cdrom"
SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="dvdrw", GROUP="cdrom"
But seems it does not work, the alias dvd and dvdrw still points to sr0
Quote:
lrwxrwxrwx 1 root root 3 2008-05-05 00:10 /dev/dvd -> sr0
lrwxrwxrwx 1 root root 3 2008-05-05 00:10 /dev/dvdrw -> sr0
Does anyone knows how to properly configure HAL and UDEV so that normal user can open the mounted DVD?

Last edited by pumpump; 05-04-2008 at 08:50 AM. Reason: Correction - should be hal not udev
 
Old 05-04-2008, 05:02 AM   #2
Smedley
Registered User
 
Registered: Apr 2008
Distribution: Slackware
Posts: 74

Rep: Reputation: 15
Is the user in the CDROM group?
 
Old 05-04-2008, 06:47 AM   #3
pumpump
LQ Newbie
 
Registered: May 2008
Location: Singapore
Distribution: Slackware, Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Smedley View Post
Is the user in the CDROM group?
Hi. Yes, I am in cdrom group.
 
Old 05-04-2008, 08:06 AM   #4
mdjenkins
LQ Newbie
 
Registered: Apr 2008
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
If the drives are showing up in /dev then I don't see what creating a udev rule is going to do besides giving us consistent /dev names for the device.
I'm not certain what daemons/groups KDE uses to handle HAL events but I would start by looking there. A quick google for KDE, HAL and Daemon returned this page - http://wiki.kde.org/tiki-index.php?p...US+for+KDE+3.x Which should help despite being a few years old. Of course, you do not want to blindly follow the instructions on this page but they should give you a good idea of how HAL and Dbus should work on KDE.

You could try placing a line in fstab to supercede how and where these devices get mounted. Personally I would rather get dbus and hal working like their supposed to. good luck

Last edited by mdjenkins; 05-04-2008 at 08:19 AM.
 
Old 05-04-2008, 08:54 AM   #5
pumpump
LQ Newbie
 
Registered: May 2008
Location: Singapore
Distribution: Slackware, Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks. Yeah, upon more searching I think hal is handling the removable media, but still not sure how to get it fixed. I tried to put the two devices in fstab, but after doing that KDE mounting dialog hangs, kded uses 100% CPU (on one core of my Pentium D), although the mount actually succeeded behind the scene. After clicking Cancel of the mount dialog, kded still runs at 100% CPU.

Killing of kded showed the following trace:

(no debugging symbols found)
...
(no debugging symbols found)
[KCrash handler]
#5 0xb64d91af in ?? () from /usr/lib/libdbus-1.so.3
#6 0x00000000 in ?? ()


Trying fstab way under XFCE works though.

And I just tried the same thing (auto-mounting without fstab) under my Ubuntu 8.04 and got the same error (permission is set to 000). So it is not a KDE and Slackware specific problem.

Last edited by pumpump; 05-04-2008 at 09:27 AM. Reason: Add more information
 
Old 05-04-2008, 10:00 AM   #6
mdjenkins
LQ Newbie
 
Registered: Apr 2008
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
digging a bit further it looks like KDE uses a combination of ivman, pmount, dbus and hal to automount:
http://gentoo-wiki.com/HOWTO_ivman
you may want to check what version of ivman you are using.
I also found a possible solution on the ubuntu forums
http://ubuntuforums.org/showpost.php...42&postcount=8
 
Old 05-04-2008, 11:32 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware«
Posts: 11,146
Blog Entries: 3

Rep: Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406
Hi,
Quote:
Originally Posted by pumpump View Post
Hi. Yes, I am in cdrom group.
What about the other groups;

Code:
floppy audio video cdrom plugdev
Especially the 'plugdev' group.
 
Old 05-04-2008, 08:17 PM   #8
pumpump
LQ Newbie
 
Registered: May 2008
Location: Singapore
Distribution: Slackware, Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mdjenkins View Post
digging a bit further it looks like KDE uses a combination of ivman, pmount, dbus and hal to automount:
http://gentoo-wiki.com/HOWTO_ivman
you may want to check what version of ivman you are using.
I also found a possible solution on the ubuntu forums
http://ubuntuforums.org/showpost.php...42&postcount=8
Thanks. Slackware does not use ivman (at least there is no such package).
I will try the ubuntu forum solution tonight and update.
Update - tried the ubuntu forum way. Added a rule to /etc/hal/fdi/policy. Does not work.

<match key="volume.fstype" string="udf">
<merge key="volume.policy.mount_option.umask" type="string">0000</merge> <!-- or whatever you desire -->
</match>

Last edited by pumpump; 05-05-2008 at 09:29 AM. Reason: Update
 
Old 05-04-2008, 08:18 PM   #9
pumpump
LQ Newbie
 
Registered: May 2008
Location: Singapore
Distribution: Slackware, Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by onebuck View Post
Hi,


What about the other groups;

Code:
floppy audio video cdrom plugdev
Especially the 'plugdev' group.
Thanks onebuck, yes my user is in all those groups, including plugdev.
 
Old 05-05-2008, 10:31 AM   #10
pumpump
LQ Newbie
 
Registered: May 2008
Location: Singapore
Distribution: Slackware, Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
I found something. The problem is not due to hardware or software, it is related to the DVD. Somehow when I put in a DVD(+R) disk burnt using K3B (somemore with more than 4gb file), it has this problem. If I put in a CD-ROM, a normal DVD, or a DVD+R burnt under Windows, it can be mounted with right permissions (when device is not in fstab, didn't try the other way).

The DVD was burnt using k3b with the following settings:

Does anyone know what setting caused this problem? Thanks.
 
Old 05-06-2008, 10:11 AM   #11
pumpump
LQ Newbie
 
Registered: May 2008
Location: Singapore
Distribution: Slackware, Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
Another update. I found some other similar problem reports.

e.g. http://bugs.gentoo.org/show_bug.cgi?id=213399
http://support.zenwalk.org/viewtopic.php?f=6&t=14373

So confim I am not alone

If the DVDs I burnt (using k3b and cdrtools 2.1.1a38) are mounted using iso9660 type, the permissions are ok. If mounted using udf, the permission is "d---------".

I am not sure whose problem is this... cdrtools? mount? or something else?

But before that is solved, anyone knows how to instruct hal to mount the DVDs using iso9660 instead of udf? As I said above, if I put the dvd drives into fstab with type iso9660, kded (kde mediamanager) will hang at mounting time, so cannot do that.

Last edited by pumpump; 05-06-2008 at 08:48 PM. Reason: add tags
 
Old 07-24-2008, 04:33 PM   #12
ActiveMan
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Rep: Reputation: 0
The same problem here

Hello, I'm also using Slackware 12.1, KDE 3.5.9 and I'm having the same problem. If I mount it manually with:

$ sudo mount -t iso9660 /dev/cdrom /mnt/cdrom
$ ll -d /mnt/cdrom
dr-xr-xr-x 2 root root 2048 2008-07-24 23:00 /mnt/cdrom/

It is correctly mounted. However, by default, KDE mounts it as UDF and the same problem appears:

$ ll -d /mnt/cdrom
d--------- 2 root root 184 2008-07-24 23:00 /mnt/cdrom/

In my Mac OS X I have the same problem because OS X mounts the DVD by default with UDF.

In my opinion, this is due to a problem in K3B burning options.

Last edited by ActiveMan; 08-02-2008 at 03:52 AM.
 
Old 08-03-2008, 03:42 AM   #13
ActiveMan
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Rep: Reputation: 0
Thumbs up How I solved it

Hello I have found that K3B uses growisofs to create and burn the DVD and there is the problem. Specifically, growisofs calls mkisofs without the -r option, hence the UDF iso is created without permissions.

To solve it I have done it manually:

1) Create a UDF iso image with the -r to allow reading and the -V option for the DVD title:

$ mkisofs -udf -r -V DVD75 -o dvd75.iso /home/flh/DVD75

2) Burn the CD logged as root:
# cdrecord -scanbus
Cdrecord-ProDVD-ProBD-Clone 2.01.01a38 (i686-pc-linux-gnu) Copyright (C) 1995-2008 J÷rg Schilling Linux sg driver version: 3.5.27
Using libscg version 'schily-0.9'.
scsibus2:
2,0,0 200) 'ATA ' 'HTS541080G9SA00 ' 'MB4O' Disk
2,1,0 201) *
2,2,0 202) *
2,3,0 203) *
2,4,0 204) *
2,5,0 205) *
2,6,0 206) *
2,7,0 207) *
scsibus1000:
1000,0,0 100000) 'MATSHITA' 'DVD-RAM UJ-832S ' '1.00' Removable CD-ROM
1000,1,0 100001) *
1000,2,0 100002) *
1000,3,0 100003) *
1000,4,0 100004) *
1000,5,0 100005) *
1000,6,0 100006) *
1000,7,0 100007) *

# cdrecord -v dev=1000,0,0 dvd75.iso #It works

If I make use of growisofs to burn the CD, it is written without permissions:

# growisofs -Z /dev/dvd=dvd75.iso # It fails

Last edited by ActiveMan; 08-03-2008 at 03:43 AM.
 
Old 08-03-2008, 11:41 AM   #14
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by ActiveMan View Post
In my opinion, this is due to a problem in K3B burning options.
You are no doubt aware that you can set the burning options that K3B uses?
 
  


Reply

Tags
access, cdrecord, cdrtools, dvd, growisofs, hal, iso9660, k3b, kde, linux, mkisofs, mount, permission, slackware, udev, udf


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
permission problems with mounted device fakie_flip Linux - Software 2 12-26-2007 07:52 PM
Can't get RW permission on a mounted samba share darkangel12613 Linux - Software 6 08-31-2006 07:04 AM
permission problems with udev: can't access dvd schatoor Linux - General 1 02-08-2006 05:40 PM
mounted but no write permission varunk123456 Red Hat 1 03-31-2004 02:54 PM
permission of mounted NTFS partition demmylls Linux - Security 2 11-29-2003 11:08 PM


All times are GMT -5. The time now is 07:43 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration