public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] udev and device ownership
@ 2007-03-10 22:51 paulie.x
  2007-03-11  8:45 ` Neil Bothwick
  0 siblings, 1 reply; 4+ messages in thread
From: paulie.x @ 2007-03-10 22:51 UTC (permalink / raw
  To: gentoo-user

Hi.
For a long time i used this udev rules for my mp3 player and flash disk
10-local.rules:
UBSYSTEMS=="scsi", ATTRS{model}=="LYRA_MPHR2301_EU", OWNER="old_user", 
SYMLINK+="lyra"
SUBSYSTEMS=="scsi", ATTRS{vendor}=="USB 2.0", ATTRS{model}=="Flash Disk", 
OWNER="old_user", SYMLINK+="massive"

In /etc/fstab I had (and still have) following lines:
/dev/massive	/mnt/massive  vfat	owner,noatime,rw,utf8           0 2
/dev/lyra		/mnt/lyra        vfat	owner,noatime,rw,utf8           0 2

So I could write and delete files under mounted folders like regular user.
I created new user and just changed OWNER in 10-local.rules to new username. 
Now when I plug in mp3 player it created device node (example) /dev/sdc and 
rightly I'm owner of this file but I'm not owner of the link so I cannot 
mount it like regular user. And when I mount it like root I cannot manipulate 
with data on the device.
Thx
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] udev and device ownership
  2007-03-10 22:51 [gentoo-user] udev and device ownership paulie.x
@ 2007-03-11  8:45 ` Neil Bothwick
  2007-03-11 13:07   ` paulie.x
  0 siblings, 1 reply; 4+ messages in thread
From: Neil Bothwick @ 2007-03-11  8:45 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]

On Sat, 10 Mar 2007 23:51:56 +0100, paulie.x wrote:

> I created new user and just changed OWNER in 10-local.rules to new
> username. Now when I plug in mp3 player it created device node
> (example) /dev/sdc and rightly I'm owner of this file but I'm not owner
> of the link so I cannot mount it like regular user. And when I mount it
> like root I cannot manipulate with data on the device.

Is the new user a member of the plugdev group? If not, they wouldn't be
able to mount it.

Add "umask=0" to the options in /etc/fstab to allow all users read/write
access, even when mounted as root. See the FAT options in man mount if you
want more fine-grained control over this.


-- 
Neil Bothwick

Click..Click..Click..Damn! Out of taglines!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] udev and device ownership
  2007-03-11  8:45 ` Neil Bothwick
@ 2007-03-11 13:07   ` paulie.x
  2007-03-11 16:12     ` Neil Bothwick
  0 siblings, 1 reply; 4+ messages in thread
From: paulie.x @ 2007-03-11 13:07 UTC (permalink / raw
  To: gentoo-user

Dne ne 11. březen 2007 09:45 Neil Bothwick napsal(a):
> On Sat, 10 Mar 2007 23:51:56 +0100, paulie.x wrote:
> > I created new user and just changed OWNER in 10-local.rules to new
> > username. Now when I plug in mp3 player it created device node
> > (example) /dev/sdc and rightly I'm owner of this file but I'm not owner
> > of the link so I cannot mount it like regular user. And when I mount it
> > like root I cannot manipulate with data on the device.
>
> Is the new user a member of the plugdev group? If not, they wouldn't be
> able to mount it.
>
> Add "umask=0" to the options in /etc/fstab to allow all users read/write
> access, even when mounted as root. See the FAT options in man mount if you
> want more fine-grained control over this.

Yes I'm in plugdev group. Problem is that I'm owner of the /dev/sdc block 
device but owner and group of link that udev creates is root.
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] udev and device ownership
  2007-03-11 13:07   ` paulie.x
@ 2007-03-11 16:12     ` Neil Bothwick
  0 siblings, 0 replies; 4+ messages in thread
From: Neil Bothwick @ 2007-03-11 16:12 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

On Sun, 11 Mar 2007 14:07:00 +0100, paulie.x wrote:

> Yes I'm in plugdev group. Problem is that I'm owner of the /dev/sdc
> block device but owner and group of link that udev creates is root.

OK, instead of

SUBSYSTEMS=="scsi", ATTRS{model}=="LYRA_MPHR2301_EU", OWNER="user",
SYMLINK+="lyra"

do

SUBSYSTEMS=="scsi", ATTRS{model}=="LYRA_MPHR2301_EU", OWNER="user", NAME="lyra" SYMLINK="%k"

-- 
Neil Bothwick

Of all the people I've met you're certainly one of them.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-11 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-10 22:51 [gentoo-user] udev and device ownership paulie.x
2007-03-11  8:45 ` Neil Bothwick
2007-03-11 13:07   ` paulie.x
2007-03-11 16:12     ` Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox