# howto: user mount external media



## graudeejs (Jan 8, 2011)

This have been asked so many times, that I decided to write howto

to /etc/sysctl.conf add

```
vfs.usermount=1
```

to /etc/devfs.conf add

```
perm    acd0    0660
own     acd0    root:operator

perm    cd0     0660
own     cd0     root:operator
```

to /etc/devfs.rules add

```
[localrules=10]
add path 'da*' mode 0660 group operator
add path 'md*' mode 0660 group operator
```
NOTE: I added *md** to let users mount virtual images (mdconfig(8))

to /etc/rc.conf add

```
devfs_system_ruleset="localrules"
```

And now make ~/mnt/ for every user

Now after restart users in *operator* group will be able to mount external media to ~/mnt/ like this:
For UFS formated flash:
`$ mount -t ufs /dev/da0 ~/mnt`
For CD:
`$ mount -t cd9660 /dev/acd0 ~/mnt`


*Related posts:*
http://forums.freebsd.org/showthread.php?t=20159 - Automount


----------



## YZMSQ (Jan 26, 2011)

Thank you,it's very useful!


----------

