View previous topic :: View next topic |
Author |
Message |
jcolby n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 20 Apr 2004 Posts: 27
|
Posted: Sat Dec 26, 2009 6:33 pm Post subject: udev rule to change permissions on /dev/sda |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
r3tep Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/520464240443a395f4c613.jpg)
Joined: 10 Sep 2005 Posts: 108
|
Posted: Sat Dec 26, 2009 6:36 pm Post subject: |
|
|
Why dont you set permissions in /etc/fstab? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jcolby n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 20 Apr 2004 Posts: 27
|
Posted: Sat Dec 26, 2009 6:59 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
r3tep Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/520464240443a395f4c613.jpg)
Joined: 10 Sep 2005 Posts: 108
|
Posted: Sat Dec 26, 2009 9:59 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|