UFS Automount

  • Somewhere in your package messages pkg info -aD|less (search for mount with the slash ("/") key) you'll find what you need. Typically vfs.usermount=1 in sysctl.conf(5) ( service sysctl reload) will enable user mounts automagically via HAL (hald(8), service hald enable & service hald restart). Obviously, hald(8) must be up & running.
  • Maybe you find sysutils/most more comfortable than less(1)/more(1).
  • It's a good idea to read through all package messages anyway, and edit some config files as requested.
  • Your user randy should be in the wheel group to be able to su(do) to root, and in the operator group because that is typically used to grant access to devices; traditionally, users in this group were the ones to take backups.
  • Do not grant write mode on devices to anyone (666) (other (o) in symbolic modes to chmod(1))! You can literally SEE it, it's evil...
  • It's not sufficient to just write some configuration in some file. You must apply your changes by restarting the respective service, e.g. service devfs restart.
Good luck!
 
FYI: Vermaden's "automount" has never failed me and is dead simple to install and use. Availablee here: https://github.com/vermaden/automount

It's just a script and he includes instructions so I actually don't use the port or package, just the GitHub version.

Caveat: I use this for thumb drives so can't speak to any other type of drive. I could never get sysutils/dsbmd to work at all.

Thanks for giving your experience with automount. It seems to be just fine at the moment. The da0 is mounting just fine, but still the system won't eject the device. Gives a umount: umount of media/da0s1 failed: operation not permitted. When I open the device da0s1 with Caja and look at the permission tab the first tab shows Owner: Root - Charlie & - the second tab shows Group: Wheel. I'm not experienced with Chown much and am fearful of using this command: Chown 666 /dev/da0s1 /usr/home/myusername. What are your thoughts?
 
  • chmod 666 xyz: Don't do that! Period. Any other user can write to your files, e.g. a service (daemon) gone wild. You don't want that, right?!
  • When the device does not unmount, it's because some file is still opened on that device. Typically that's the file manager you opened to view the contents of the mounted directory. Close it, then you should be able to unmount.
  • If that does not succeed, you can find out which program(s) opened which file(s): fstat -fm /media/* | less (or most(1) instead of less(1)). The 3rd column show the PID of the respective program. Close the program, or kill <pid> it. Many people like the advanced features of lsof(8) (list open files), you can install it and use that instead of the standard fstat(1).
  • You can pkg install vim & gview /usr/local/sbin/automount & to read about the options of vermaden's automount, and of course also gvim /usr/local/etc/automount.conf.sample & & save it to /usr/local/etc/automount.conf.
  • You wrote you have KDE? Then you can view the file with konqueror (right click, preview in: editor component) or edit with kate instead of gview(1)/gvim(1).
 
Solved Mounting & Permission issue! Hopefully, some of this may help others.
pkg install automount then service devd restart - in /etc/rc.conf add autofs_enable="YES"
cd /usr/local/etc
and cat automount.conf.sample and copy the files contents to a new file by;
ee automount.conf file and place the sample content into the new automount file
change the new automount.conf file to show:
#MNTPREFX="media"
USERUMOUNT="YES"
USER="Your User Name"
ATIME="NO"
REMOVEDIRS="YES"

reboot


Brought the use of my da0 devices as user to be able to read and write to life!!
 
cd /usr/local/etc and cat automount.conf.sample and copy the files contents to a new file by;
ee automount.conf file and place the sample content into the new automount file
But why don't just cp automount.conf.sample automount.conf?
 
After just coming across this thread, and with it being three years old, I wondered if all the info is still correct...
 
Back
Top