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

abefar

Member

Thanks: 5
Messages: 25

#1
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:
Code:
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:
Code:
$ 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:
Code:
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?
 
OP
OP
A

abefar

Member

Thanks: 5
Messages: 25

#2
See FreeBSD handbook 17.4.1. Device Configuration
There read about devfs.rules
and vfs.usermount=1 accordingly.
Thanks, I have just added
Code:
[localrules=5]
add path 'cd*' mode 0660 group operator
to /etc/devfs.rules, added
Code:
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.
 
Top