UFS Automount

Please, after following the handbooks syntax for mounting/automounting a usb drives, I'm needing freebsd professionals to talk with me as if I'm a third grader about the most simple process to carry out an automouting of usb flash drives, hhd's etc. . . as user not root.
 
For NTFS/USB
/boot/loader.conf
Code:
fuse_load="YES"

/etc/sysctl.conf
Code:
vfs.usermount=1

Permission for user of wheel group
/etc/devfs.conf
Code:
own   /dev/da0    root:operator
perm  /dev/da0    0660

Customize rules without changing defaults/ for GPT and USB/HDD
/etc/devfs.rules
Code:
[localrules=5]
add path 'da*' mode 0660 group operator
add path 'gpt/*' mode 0660 group operator

Load modified rules without changing defaults
/etc/rc.conf
Code:
devfs_system_ruleset="localrules"

Normal User mound commands:
GPT USB/HDD: mount /dev/gpt/hddName /media
Another form: mount_fusefs auto /media ntfs-3g /dev/da0p1 /media
Umound: umount /media

Some other useful commands root and non-root:
Mound CD: mount -t cd 9660 /dev/da0 /media
NTFS: ntfs-3g /dev/da0p1 /media
Another form: mount -t ntfs /dev/da1p1 /media
FAT: mount -t msdosfs /dev/da0s1 /media

[EDIT] thanks Zvoni I fixed it.
 
Last edited:
In order for the automount to work as it is, just follow the steps below:
1. install packages
Code:
pkg install automount fuse-lkl
2. turn off hald so that it does not start on system startup
/etc/rc.conf
Code:
hald_enable="NO"
3. edit /usr/local/etc/automount.conf
Code:
USERUMOUNT = YES
4. add fuse module to autostart
/etc/rc.conf
Code:
kld_list="fuse"
5. disable earlier automount systems/deamons
6. reboot system
 
Thanks for thinking about my issue and offering advice. Nevertheless, none of them solved the autoboot issue. Thus, I decided to use all four system 1tb drives and reload freebsd12.1 using zfs and raid 1+0. I not sure if zfs will have different syntax for automount, but I sure do need automount for both my da0 and cd0 devices as user.
 
Have you tried bsdisks? After you disable hald it may help. The latest version seems to be working for general automounting.
 
I've put chmod a+s /sbin/mount so a regular user can mount.
chown myuser:myuser /mnt
chown myuser:myuser /mnt/myusb
Then I simply do a "mount -t msdosfs /dev/X /mnt/myusb"
It's not automatic, but flexible.
 
I'm only able to use KDE5, GNOME3, or MATE as user. Right now I'm using KDE5. K3b will not work at all; cannot make any changes while open as user in the configure, settings, program windows. So I loaded Brasero and opened in user mode needing to blank a disk and burn an ISO image. However, I always receive a no disk available message (there is a new DVD + RW disk in the drive). I've tried every suggestion offered on this forum and google searches with no success. It has to be something simple that I've missed. When I was able to open KDE5, GNOME, & MATE as root and everything work great. USB automatically mounted and So did the CD/DVD. What in God's green earth is going on now with KDE, GNOME & MATE not able to be opened as root? Is there any administrator, moderator, programmer with FreeBSD who has an answer. I've spent 3 complete days reading chapters in the handbook, researching with google, and from my many notes from when I started using FreeBSD 4.7 through to 12.1. Nothing has worked. I was able to open the aforementioned GUI's as ROOT on the exact same system where those mountings work just fine. Also, I've complete blanked my 4 -1 tb drives and reinstalled Freebsd12.1 using ZFS - RAID 1+0 with the FreeBSD install procedures.

Hope someone much more accomplished than me will help - Thanks for listening to my polemic.

I have not mastered being able to attach my devfs.conf, devfs.rules, rc.conf file or the chown process that I've carried out - sorry. Maybe some one could work with me as if I'm a thrid grader so as to be able to attach files.
 
rpowell47 Please have a look at Xfburn. You have tried both K3b and Brasero but not my favorite Xfburn yet ;)
 
add group dvdrw to system
add your-user to dvdrw group


Put in file /etc/devfs.conf
own acd0 root:dvdrw
perm acd0 660
own cd0 root:dvdrw
perm cd0 660
own pass0 root:dvdrw
perm pass0 660
own pass1 root:dvdrw
perm pass1 660
own pass2 root:dvdrw
perm pass2 660
own xpt0 root:dvdrw
perm xpt0 660
link acd0 cdrom

and k3b brasero xfburn should be work
 
For NTFS/USB
/boot/loader.conf
Code:
fuse_load="YES"

/etc/sysctl.conf
Code:
vfs.usermount=1

Permission for user of wheel group
/etc/devfs.conf
Code:
own   /dev/da0    root:wheel
perm  /dev/da0    0660

Customize rules without changing defaults/ for GPT and USB/HDD
/etc/devfs.rules
Code:
[localrules=5]
add path 'da*' mode 0660 group operator
add path 'gpt/*' mode 0660 group operator

Load modified rules without changing defaults
/etc/rc.conf
Code:
devfs_system_ruleset="localrules"

Normal User mound commands:
GPT USB/HDD: mount /dev/gpt/hddName /media
Another form: mount_fusefs auto /media ntfs-3g /dev/da0p1 /media
Umound: umount /media

Some other useful commands root and non-root:
Mound CD: mount -t cd 9660 /dev/da0 /media
NTFS: ntfs-3g /dev/da0p1 /media
Another form: mount -t ntfs /dev/da1p1 /media
FAT: mount -t msdosfs /dev/da0s1 /media
IIRC, don't you have to add your User to group "operator"?
 
  • Thanks
Reactions: a6h
Thanks to all who have given of their time in this matter!! I'm able to have both devices (da0 & cd0) automount now by installing (pkg automount & then typing service devd restart)! Nonetheless, da0 will not allow me to copy and open any files because of permission. I've used chown and chmod to no avail. And, changed the devfs.conf file to reflect (add path 'da*' mode 0660 group operator) chmod 666 /dev/da0 and chown 666 /dev/da0. And, still get the error message that da0 or da0s1 shows that permission is denied because of ownership. Any thoughts!!
 
Here is a snap shot of my devfs.rules
 

Attachments

  • Screenshot from 2020-08-31 14-55-43.png
    Screenshot from 2020-08-31 14-55-43.png
    140.1 KB · Views: 117
add group dvdrw to system
add your-user to dvdrw group


Put in file /etc/devfs.conf


and k3b brasero xfburn should be work

Thanks For Your Response. How to I change the ownership of my usb thumb drive so I can transfer files to it. It is mounted just don't have permission to update files. I tried chown 666 /dev/da0 /usr/home/randy (no work though) The name of the device is Spain if that matters.
 
Is your User member of group operator?
and Vigole told you for devfs.conf to use "root : operator" (not wheel),
and where is your devfs.rules?
 
Is your User member of group operator?
and Vigole told you for devfs.conf to use "root : operator" (not wheel),
and where is your devfs.rules?

Ok, please show me the syntax for the proper "root:eek:perator" (not wheel)
See additional attached screenshot of "group" Should randy not be added to [wheel:*:0:root,randy] - but instead just [wheel:*:0:root] for example?



devfs.rules
 

Attachments

  • Screenshot at 2020-09-01 07-09-24.png
    Screenshot at 2020-09-01 07-09-24.png
    136.7 KB · Views: 146
  • Screenshot at 2020-09-01 07-13-35.png
    Screenshot at 2020-09-01 07-13-35.png
    120.3 KB · Views: 160
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.
 
Is your USB thumb FAT32 formatted? I use this command to mount my FAT32 usb drive:

Code:
mount_msdosfs -u 1001 -g 1001 -m 644 -M 755 /dev/da0s1 /mnt
 
Back
Top