# /dev/sd* permissions: booting VMware physical disk [SOLVED]

## kristoczaj

I'm running a Windows under VMware from a physical disk. In order to do that, vmware needs permissions to access the disk.

So far, I've added my user to the disk and vmware groups, and after every boot, I do:

```

# ls -l /dev/sd*

brw-r----- 1 root disk 8,  0 V 14 12:47 /dev/sda

brw-r----- 1 root disk 8,  1 V 14 12:47 /dev/sda1

brw-r----- 1 root disk 8,  2 V 14 12:47 /dev/sda2

...

# chmod g+w /dev/sd*

# ls -l /dev/sd*

brw-rw---- 1 root disk 8,  0 V 14 12:47 /dev/sda

brw-rw---- 1 root disk 8,  1 V 14 12:47 /dev/sda1

brw-rw---- 1 root disk 8,  2 V 14 12:47 /dev/sda2

...

```

After that I run VMware as the user, and it boots from physical disk.

How can I make it persistent?

Or maybe what's a better/safer way for VMware to be able to boot from physical disk?

CheersLast edited by kristoczaj on Tue May 27, 2008 2:32 pm; edited 1 time in total

----------

## Tin

Hi,

I had exactly the same problem.

The only solution was your trick, and I put it in the "local" init script :

```
rebel ~ # cat /etc/conf.d/local.start

#

# for vmware to be able to be launched by normal user

if [[ -e /dev/hda ]]

then

        ebegin "Setting read/write rights for all users on /dev/hda*"

        chmod o+rw /dev/hda*

        eend $?

fi

if [[ -e /dev/sda ]]

then

        ebegin "Setting read/write rights for all users on /dev/sda*"

        chmod o+rw /dev/sda*

        eend $?

fi

```

----------

## alkan

or you can put a rule file in /etc/udev/rules.d/, something along the lines:

```
KERNEL=="sda3", GROUP="vmware" MODE=660
```

You can also specify sda*, sda[1-3], or combination of patterns depending on which partition(s) you'd like to modify the permissions for. Give it a name so that it is executed after udev's own rules for storage.

----------

## kristoczaj

 *alkan wrote:*   

> or you can put a rule file in /etc/udev/rules.d/, something along the lines:
> 
> ```
> KERNEL=="sda3", GROUP="vmware" MODE=660
> ```
> ...

 

Thanks for this tip, it looks like what I need, but:

I created /etc/udev/rules.d/99-vmware.rules

```

KERNEL=="sda3", GROUP="disk" MODE=660

KERNEL=="sdb[2-3]", GROUP="disk" MODE=660

```

But the mode after reboot is still 600.

Do I need some update to make this work?

Note: I discovered a file (probably created by VMware) also exists: /etc/udev/rules.d/60-vmware.rules - could this be the problem?

EDIT: I tried to rename the file I created: 99-vmware.rules --> 99-my_vmware.rules, and running update-env. No efect.

----------

## kristoczaj

 *kristoczaj wrote:*   

> 
> 
> ```
> 
> KERNEL=="sda3", GROUP="disk" MODE=660
> ...

 

I changed the file:

```

KERNEL=="sda3", SUBSYSTEM=="block", GROUP="disk", MODE="0660"

KERNEL=="sdb[23]", SUBSYSTEM=="block", GROUP="disk", MODE="0660"

```

Now it works. I suspect it didn't work because of lack of ',' before MODE and lack of '"' around 660.

Btw, I discovered: in order to apply the rules without rebooting:

```
# udevtrigger
```

----------

