View previous topic :: View next topic |
Author |
Message |
afabco Guru
Joined: 24 Feb 2004 Posts: 380
|
Posted: Sun Aug 13, 2006 9:27 pm Post subject: dvd-ram, ivman,user,group,permissions? |
|
|
Well, seeing as I didn't have enough pain and frustration in my life today, I decidet to tackle ivman yet again. I think I'll do it one issue at a time, maybe there'll be satisfaction in afabcoville.
Someday.
Anyway, first issue is how to get dvd-rams to behave properly.
problem: dvd-ram mounts, but only root can access it.
what I think should happen: dvd-ram mounts, and anyone in the plugdev group can read/write/delete to/from the dvdram.
details:
Quote: | ~ $ lshal --monitor
Start monitoring devicelist:
-------------------------------------------------
volume_label_MEI_UDF added
volume_label_MEI_UDF property volume.mount_point = '/media/hdc'
volume_label_MEI_UDF property volume.is_mounted = true
|
Quote: |
~ $ ls -la /media/hdc
ls: /media/hdc: Permission denied |
Quote: | ~ $ ls -ld /media/hdc
drwxrwx--- 5 root root 133400 Aug 13 01:34 /media/hdc |
Quote: | ~ $ mount
<snip>
/dev/hdc on /media/hdc type udf (rw,noexec,nosuid,nodev,uid=104,gid=1009,umask=007)
|
Quote: | ~ $ grep 104 /etc/passwd
ivman:x:104:1009:added by portage for ivman:/dev/null:/bin/false
~ $ grep 1009 /etc/group
plugdev:x:1009:joeuser,ivman,haldaemon
|
Quote: | ~ $ touch /media/hdc/test
touch: cannot touch `/media/hdc/test': Permission denied |
Quote: | ~ $ cat /etc/fstab
<snip>
/dev/md13 /home ext3 noatime 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none /dev/shm tmpfs defaults 0 0
## Anything below added by udev/hal/ivman
~ $ |
Quote: | $ fgrep -ir dvd /etc/hal
$
$ fgrep -ir dvd /etc/dbus-1/
$
$ fgrep -ir dvd /etc/udev
/etc/udev/rules.d/50-udev.rules:ENV{ID_CDROM_DVD}=="?*", PROGRAM="seq_node.sh %r %k dvd", SYMLINK+="%c"
/etc/udev/rules.d/50-udev.rules:ENV{ID_CDROM_DVD_R}=="?*", PROGRAM="seq_node.sh %r %k dvdrw", SYMLINK+="%c"
/etc/udev/rules.d/50-udev.rules:KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrw", MODE="0660"
/etc/udev/rules.d/50-udev.rules:KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/pktcdvd%n", GROUP="cdrw", MODE="0660"
$ fgrep -ir dvd /etc/ivman
/etc/ivman/IvmConfigActions.xml: execdvd (string) - execute the given command if device is a video DVD volume (DEPRECATED)
/etc/ivman/IvmConfigActions.xml: A single device can have multiple exec, execdvd and execun
/etc/ivman/IvmConfigActions.xml: <!-- example - autoplay video DVDs -->
/etc/ivman/IvmConfigActions.xml: <ivm:Match name="hal.volume.disc.is_videodvd" value="true">
/etc/ivman/IvmConfigActions.xml: <ivm:Option name="exec" value="pumount '$hal.block.device$' && /usr/bin/mplayer dvd://1 -really-quiet -fs" />
|
This last is different. I remember from fighting with this issue in the past that there were specific references to dvdrams in one or more of the udev/dbus/hal/ivman config files. What's changed, and why?
I guess first question is whether this is an ivman problem or a hal problem? or something else?
The lack of an entry at the end of /etc/fstab indicates something may be fsck'ed with ivman's functionality (on my machines, or in general), but then again, does ivman still mess with /etc/fstab? I have a vague memory of someone saying that ivman didn't mess with /etc/fstab as of a rev or two ago, but I can't find the reference.
What next?
And thanks in advance! |
|
Back to top |
|
|
Iced-Tux Apprentice
Joined: 14 Apr 2004 Posts: 183 Location: Germany, Cologne
|
Posted: Mon Aug 14, 2006 11:10 am Post subject: |
|
|
Hi,
how did you start ivman? I assume you have ivman started per rc-update add ivman default?
Try to launch ivman as user and be certain, that you have no media inserted when you start ivman.
What's wierd though is, that your mount says uid=ivman, gid=plugdev, whereas ls shows root:root. _________________ !! The road to hell is full of good intentions !! |
|
Back to top |
|
|
afabco Guru
Joined: 24 Feb 2004 Posts: 380
|
Posted: Mon Aug 14, 2006 8:19 pm Post subject: |
|
|
Yes, ivman is started via rc-update add ivman default.
You are saying start ivman as a user (say, via ~/.bashrc.local) in addition to the service start, or instead of the service start?
I recognize where this is coming from, I think; the howto mentions this, but also says it's a bad idea because of the potential for race conditions when multiple users are running ivman.
And yes, I thought the ivman:plugdev vs root:root was weird too.
Sign me,
Mystified. _________________ Anyone who puts a small gloss on a fundamental technology, calls it proprietary, and then tries to keep others from building on it, is a thief.
-Tim O'Reilly |
|
Back to top |
|
|
Iced-Tux Apprentice
Joined: 14 Apr 2004 Posts: 183 Location: Germany, Cologne
|
Posted: Tue Aug 15, 2006 8:26 am Post subject: |
|
|
Hi, I have used ivman without trouble with this config:
- ivman in run-level default
- ivman started in .xsession Code: | exec ivman-launch --exit-with-session openbox |
I have an external USB-hdd, so when I logged in and switched it on, it was mounted as myusername:myusergroup. I switched this behaviour because I wanted other user *namely mpd* to access my mp3's without putting them in myusergroup.
Quote: | It is possible - and in many cases, appropriate - to run Ivman both as root and as a regular user. In this case, automounting will be done by the regular user instance of Ivman; once this Ivman exits, automounting will automatically fall back to the root instance. Do NOT run more than one instance of per-user Ivman, even under different user accounts - this will cause race conditions. |
This is from the Ivman Howto. I would recommend to leave through this once again in case you missed something.
iced-tux
BTW: have you looked into bugs.gentoo.org to see if there is a bug? _________________ !! The road to hell is full of good intentions !! |
|
Back to top |
|
|
nabla² Apprentice
Joined: 17 May 2005 Posts: 280
|
Posted: Sat Sep 02, 2006 10:37 am Post subject: |
|
|
Take the newest pmount (0.9.13). The umask is changed, the rights are still set too root, though... It should work nonetheless. _________________ Gentoo on Intel Core Duo 2 E6750, Gigabyte P35-DS3P, NVIDIA 8800GTS (amd64) |
|
Back to top |
|
|
afabco Guru
Joined: 24 Feb 2004 Posts: 380
|
Posted: Fri Sep 08, 2006 6:49 am Post subject: |
|
|
Putz'ed around with this a bit more, and still no happiness
A couple of things from the man page and from the howto referred to earlier finally penetrated, that tells me that ivman in the direction it's going will not do what I need; it's not intended to be a used on a multi-user system:
Code: |
To unmount drives as a regular user:
<snip>
* For versions of ivman later than 0.5.x, another instance of ivman must be run by the user in addition to the one run by root | .
(I assume 'must' means must as in no choice).
but:
Quote: |
Do NOT run more than one instance of per-user Ivman, even under different user accounts - this will cause race conditions. |
Then
Code: | # Ivman runs under your user account. [i]<the implication being one-and-only-one has to be a real person login account>[/i]
* NOTE: you still have to belong to the plugdev group, but now devices are mounted so that only you have access (not the rest of the plugdev users, too)
# By default, removable drives will be mounted with read/write access for you, and no access for anyone else. |
This all tells me this incarnation of ivman is suitable for single-person-user-at-a-time systems.
I am going to try dropping back to 0.5 (or before) version when anyone in the plugdev group could access the media, and putting 'users' in the mounting sequence worked just fine for umounting.
I've already got the old tarballs off sourceforge, but does anyone have any of the ebuilds for the 0.5 series or earlier archived? Maybe save me a bit of time from having to deconstruct the current ebuild?
Anyway, thanks to all _________________ Anyone who puts a small gloss on a fundamental technology, calls it proprietary, and then tries to keep others from building on it, is a thief.
-Tim O'Reilly |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|