Solved Automount in Mate

Hello,
I'm running FreeBSD 12 beta4 on my Asus K53SC with Mate 1.20 and I'm trying to enable automount in USB following Chapter 17.4.2 in the HandBook.

I had to disable hal in /etc/rc.conf not to have this error:
Code:
cannot obtain lock on /media/.hal-mtab

Now I can navigate my Debian ext2 partition and my Fat 32 USB but I have some issues:

- I can't unmount usb as regular user; I get "Operation Nont Permitted" in Caja File Manager
- I have only read access in my FAT32 USB;
- I cannot mount my external NTFS hard disk
Code:
mount -t ntfs da1s1 /mnt
mount: da1s1: Operation not supported by device

Do I have to install fuse to get ntfs working under autofs/automount?
How about rw access in my pen drive?
 
If you want to mount FAT32 or NTFS vermaden's sysutils/automount based on devd(8) is another alternative - see Thread 29895.

I'm using it for almost one year now after switching to BSD and it serves it's purpose pretty good.
It's simple and easy to configure and modify, will mount devices as user and supports all common FMs (including x11-fm/caja).
If it is important for you, sysutils/automount doesn't support MTP devices awa BTRFS, XFS and HFS (yet) - as far as I know.
 
I get "Mounting failed" when trying to mount a partition as regular user. If I start dsbmd and caja as root I can mount and access partition. How can I set permissions for my user?


/usr/local/etc/dsbmd.conf
Code:
usermount = true
# allow_users - Comma separated list of users who are allowed to connect.
allow_users = ernesto
# allow_groups - Comma separated list of groups whose members are allowed
# to connect.
allow_groups = operator, wheel


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


/etc/rc.conf
Code:
dsbmd_enable="YES"


.xinitrc
Code:
dsbmc-cli -a &
dsbmc &


Code:
$ dsbmc-cli -m /dev/ada0s1
dsbmc-cli: Error: Mount command failed
 
To allow your normal users access to various disks and devices you can relax permissions on devfs(8).
For devices existing at boot time this is done via /etc/devfs.conf.

For devices that may be connected post-boot create an /etc/devfs.rules ruleset like that
Code:
[your_new_ruleset=10]
add path 'ad[0-9]\*'        mode 666
add path 'ada[0-9]\*'        mode 666
add path 'da[0-9]\*'        mode 666
add path 'acd[0-9]\*'        mode 666
add path 'cd[0-9]\*'        mode 666
add path 'mmcsd[0-9]\*'        mode 666
add path 'usbctl'            mode 666
add path 'usb/\*'            mode 666
...
Note that rulesets must have a unique name and number. To enable your new ruleset put this line in /etc/rc.conf

Code:
devfs_system_ruleset="your_new_ruleset"
 
Code:
dsbmd: dsbmd started on Mon Nov 19 08:25:42 2018
dsbmd: ioctl(/dev/cd0, CDRIOCREADSPEED): Device not configured on Mon Nov 19 08:25:42 2018

dsbmd: Client with UID 1001 connected on Mon Nov 19 08:26:11 2018
dsbmd: Command /sbin/mount_fusefs auto "${DSBMD_MNTPT}" fuse-ext2 -o 'rw+' ${DSBMD_DEVICE} "${DSBMD_MNTPT}" executed by UID 1001 failed with code 256: No error: 0 on Mon Nov 19 08:28:15 2018
 
dsbmd: Command /sbin/mount_fusefs auto "${DSBMD_MNTPT}" fuse-ext2 -o 'rw+' ${DSBMD_DEVICE} "${DSBMD_MNTPT}" executed by UID 1001 failed with code 256
In order to find out why fuse-ext2 fails, start dsbmd in foreground:
Code:
# service dsbmd stop
# /usr/local/libexec/dsbmd -f
Then try to mount the problematic device using dsbmc or dsbmc-cli as user, and post the terminal output of dsbmd.
 
Code:
Stopping dsbmd.
root@asus:/usr/home/ernesto # /usr/local/libexec/dsbmd -f
dsbmd: *****************************************************************
dsbmd: WARNING
dsbmd:
dsbmd: Ignoring deprecated 'large' mount option for msdosfs.
dsbmd: On FreeBSD >= 12 (as of r319735) this option was removed.
dsbmd:
dsbmd: Please adjust your dsbmd.conf.
dsbmd:
dsbmd: *****************************************************************

dsbmd: dsbmd started on Mon Nov 19 13:49:06 2018
dsbmd: ioctl(/dev/cd0, CDRIOCREADSPEED): Device not configured on Mon Nov 19 13:49:06 2018
dsbmd: Client with UID 1001 connected on Mon Nov 19 13:49:15 2018
mount_fusefs: failed to open fuse device: Permission denied
dsbmd: Command /sbin/mount_fusefs auto "${DSBMD_MNTPT}" fuse-ext2 -o 'rw+' ${DSBMD_DEVICE} "${DSBMD_MNTPT}" executed by UID 1001 failed with code 256: No error: 0 on Mon Nov 19 13:49:20 2018
 
Is your user member of the [FONT=Courier New]operator[/FONT] group? If not:

# pw groupmod operator -m ernesto

EDIT: Don't forget to relogin or reboot after that.
 
If you want to mount FAT32 or NTFS vermaden's sysutils/automount...

I don't care for automounting personally but have previously used sysutils/automount and sysutils/automounter together with success. It seemed to work better for me if I had them both installed.

I can't honestly remember if I did so as root or user, but I always make myself a member of the wheel and operator group.

I prefer to mount USB devices as root then access the media as such by invoking the file manager through the terminal as root. It's more orderly to me and doesn't interfere with using dd. Though I am aware it's not necessarily considered good practice.
 
Back
Top