# No access to optical drives for non-root users in FreeBSD 11.0



## abefar (Mar 5, 2017)

I cannot access my DVD-ROM drive (/dev/cd0) as a regular user on FreeBSD 11.0.

For example, when trying to play an audio CD using `cdda-player` from sysutils/libcdio, it returns:

```
status : no CD in drive (/dev/cd0)
```
When running the same command as root, it works just fine.
In WINE, the drive shows up with an empty device name and is completely unusable.

Permissions are in order:

```
$ ls -l /dev/cd0
crw-rw----  1 root  operator  0x79  5 mar. 12:41 /dev/cd0
$ groups
myuser wheel operator staff
```
I have the following in /etc/devfs.conf:

```
own    /dev/cd0 root:operator
perm   /dev/cd0 0660
```
I have tried to change the permissions to 0666 and even set the ownership to my own user and user group, to no avail.
Also, since the drive can only read and not write, I guess the default 0640 permissions would be enough.

What am I doing wrong? Is there a sysctl variable that I have missed?


----------



## abefar (Mar 5, 2017)

getopt said:


> See FreeBSD handbook 17.4.1. Device Configuration
> There read about devfs.rules
> and vfs.usermount=1 accordingly.


Thanks, I have just added

```
[localrules=5]
add path 'cd*' mode 0660 group operator
```
to /etc/devfs.rules, added

```
devfs_system_ruleset="localrules"
```
to /etc/rc.conf and restarted devfs, but unfortunately it didn't help.

Setting vfs.usermount=1 does not change anything either. Also, I'm not trying to mount the device, I only want to read CDDA data.


----------



## SirDice (Mar 6, 2017)

Is your user a member of the operator group?


----------



## abefar (Mar 6, 2017)

SirDice said:


> Is your user a member of the operator group?


Yes.


----------

