1. Add youself to operator group
sudo pw groupmod operator -m usename_here
2. Enable vfs.usermount
sudo nano /etc/sysctl.conf
… the contents
vfs.usermount=1
3. Configure devfs
sudo nano /etc/devfs.rules
… the contents
[localrules=10]
add path 'da*' mode 666 group operator ## alternatively permission 660
add path 'da*' mode 666 group usename_here ## alternatively permission 660
4. Edit /etc/rc.conf file
sudo nano /etc/rc.conf
… add
devfs_load_ruleset="YES"
devfs_rulesets="/etc/devfs.rules"
devfs_system_ruleset="localrules"
5. Re-start devfs rules
sudo service devfs restart
====================================
9.9.2025 USB mount on IceWM desktop
Edit 12.9.2025: If computer has many different usb interfaces, then the script must adjust to use the right interface. Command
echo /dev/da**
tells if there has many interfaces and command gpart show
tells more. If there has an
USB-key in port, command echo /dev/da** | awk '{print $NF}'
tells its interface.
Basic version for /dev/da0 USB-mount.zip
Full version for /dev/da0 – /dev/da4 USB-mount-full.zip