Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev rule to change permissions on /dev/sda
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jcolby
n00b
n00b


Joined: 20 Apr 2004
Posts: 27

PostPosted: Sat Dec 26, 2009 6:33 pm    Post subject: udev rule to change permissions on /dev/sda Reply with quote

Forum members -

I am trying to use raw disk mappings with virtual box, and in order to do so I need to change the permissions on /dev/sda*. If I use chmod to do it the permissions get changed back to what they were on boot. Can someone point me in the right directions as to what I need for a udev rule so the I can set the permission on boot for /dev/sda?

Thanks, and happy holidays.
James
Back to top
View user's profile Send private message
r3tep
Tux's lil' helper
Tux's lil' helper


Joined: 10 Sep 2005
Posts: 108

PostPosted: Sat Dec 26, 2009 6:36 pm    Post subject: Reply with quote

Why dont you set permissions in /etc/fstab?
Back to top
View user's profile Send private message
jcolby
n00b
n00b


Joined: 20 Apr 2004
Posts: 27

PostPosted: Sat Dec 26, 2009 6:59 pm    Post subject: Reply with quote

r3tep wrote:
Why dont you set permissions in /etc/fstab?


How do I do that? Can use fstab to set permissions on /dev/sda?

Thanks,
James
Back to top
View user's profile Send private message
r3tep
Tux's lil' helper
Tux's lil' helper


Joined: 10 Sep 2005
Posts: 108

PostPosted: Sat Dec 26, 2009 9:59 pm    Post subject: Reply with quote

I have these examples:

Code:
/dev/scd1               /media/cdrom   auto     defaults,user,noauto    0 0

Any User can mount scd1 (group dependent). Only the user, that mounted scd1 can umount it.

Code:
/dev/scd0               /media/cdrecorder auto defaults,users,noauto     0 0

Any User can mount scd0 (group dependend). Look at users. Any user can umount it. (As I understood. Not tested)

You'll find more information here: http://linux.die.net/man/8/mount.

I have never tested virtualbox before, but if there is a special user, this would solve your Problem. (set user=virtualbox)
However, if you run virtualbox as a user (not root), it'll look at /etc/fstab and mount the device, if permitted.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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