# Setting permissions to access devices.



## Crunchy (Aug 22, 2010)

I don't know what I missed...

```
uid=1001(crunchy) gid=0(wheel) groups=0(wheel)
```
But automounting pendrive gives 
	
	



```
DBus error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
```
 CD/DVD is detected but invisible in GNOME, rm works in shell after su, but not via drag&drop.
My policy is very liberal.
	
	



```
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">
        <return result="yes"/>
</config>
```
I didn't use Xorge -configure, but GNOME works fine.(?)


----------



## Crunchy (Aug 22, 2010)

Adding user to the operator group doesn't change anything...


----------



## Beastie (Aug 22, 2010)

Are HALd and D-Bus running (*pgrep hald* ; *pgrep dbus*)?
Is *vfs.usermount* enabled, i.e. =1 (*sysctl vfs.usermount*)?

----

Xorg can sometimes autodetect everything just fine and may not need any xorg.conf file.


----------



## aragon (Aug 22, 2010)

http://www.freebsd.org/gnome/docs/halfaq.html#q3


----------



## Crunchy (Aug 26, 2010)

Beastie said:
			
		

> Are HALd and D-Bus running (*pgrep hald* ; *pgrep dbus*)?
> Is *vfs.usermount* enabled, i.e. =1 (*sysctl vfs.usermount*)?


Take a look.
	
	



```
# mount
/dev/ad0s1a on / (ufs, local)
devfs on /dev (devfs, local, multilabel)
/dev/ad0s1e on /tmp (ufs, local, soft-updates)
/dev/ad0s1f on /usr (ufs, local, soft-updates)
/dev/ad0s1d on /var (ufs, local, soft-updates)
procfs on /proc (procfs, local)
/dev/msdosfs/KINGSTON on /media/KINGSTON (msdosfs, local, nosuid)
# sysctl vfs.usermount
vfs.usermount: 1
# pgrep hald && pgrep dbus
1279
1100
1076
1065
1061
1185
1184
1127
873
```


----------



## Beastie (Aug 26, 2010)

Okay, try adding a devfs rule then:
`# devfs rule add path 'da*' mode 0660 group operator` should work on the live system.

To make it permanent:
/etc/rc.conf:

```
devfs_system_ruleset="localrules"
```
/etc/devfs.rules:

```
[localrules=5]
add path 'da*' mode 0660 group operator
```
A reboot would be necessary.


EDIT: I am not sure what device you are trying to mount. The above is for USB devices. Use *acd** instead of *da** for ATAPI devices and *cd** for SCSI devices.


----------



## wblock@ (Aug 26, 2010)

Beastie said:
			
		

> To make it permanent:
> /etc/rc.conf:
> 
> ```
> ...



Just restart the devfs script after making changes (tested):
`# /etc/rc.d/devfs restart`


----------



## Crunchy (Aug 26, 2010)

Beastie said:
			
		

> Okay, try adding a devfs rule then:
> `# devfs rule add path 'da*' mode 0660 group operator` should work on the live system.


I must say, that i got. 
	
	



```
devfs rule: ioctl DEVFSIO_RADD: Input/output error
```
But it works anyway. :e


----------

