USB Stick mount operation not permitted

Good morning everyone, I need help with mounting a USB stick.

Initial situation: USB stick with 128GB, empty, to be used as a backup device (e.g. .config files)

mount /dev/da0p1 ~/stick always results in operation not permitted and is only available with doas.

What has already been tried from the research:
Code:
gpart destroy -F /dev/da0
gpart create -s gpt /dev/da0
gpart add -t freebsd-ufs /dev/da0
newfs /dev/da0p1
mount /dev/da0p1 ~/stick
sysctl.conf:
Code:
vfs.usermount=1
boot/loader.conf:
Code:
vfs.usermount=1
/etc/fstab
Code:
/dev/da0p1    /home/user/stick    udf    ro,noauto    0  0
/etc/devs.conf:
Code:
own       /dev/da0       root:operator
perm      /dev/da0       0664
/etc/group
Code:
operator:*:5:root,user
 
Last edited by a moderator:
Maybe reset the usb device using usbconfig -d ugen?.? reset. I need to do this now and then.
 
mount /dev/da0p1 ~/stick always results in operation not permitted and is only available with doas.
mount is an option for which root rights are needed.
So, in case if you have opendoas installed on your system try to issuing doas -- mount /dev/da0p1 $HOME/stick.
Create $HOME/stick first.
 
This should have worked. If you do `id`, does it list you in the operator group?

As a test I would `chown user /dev/....`
 
Code:
dice@armitage:~ % sysctl -d vfs.usermount
vfs.usermount: Unprivileged users may mount and unmount file systems
Interesting, never knew that it was possible to mount a device without root rights. For that to happen and persist reboots/coldboots I eventually need to insert vfs.usermount=1 into /etc/sysctl.conf right?
 
HI

Make you user account a member of the operator group .
run Utility "usbconfig" to understand which device you USBstick is using .
Use the /etc/devfs.rules to make the system give the appropriate USB device ( /dev/usb/x.x.x ) operator as group owner and RW as permission.
Read Handbook chapter 20.4 : get the config files setup.
Reboot.
 
Interesting, never knew that it was possible to mount a device without root rights. For that to happen and persist reboots/coldboots I eventually need to insert vfs.usermount=1 into /etc/sysctl.conf right?
correct and I believe you need to be in the operator group as well.

If you use a DE like KDE then the mount icon in the system tray works or in Xfce you can install from pkg/port dsbmc to mount usb with a gui
 
correct and I believe you need to be in the operator group as well.

If you use a DE like KDE then the mount icon in the system tray works or in Xfce you can install from pkg/port dsbmc to mount usb with a gui
I see, thank you.
No, I am using a window manager, but I could add myself into the operator group with # pw usermod -G group1,group2... -n $USER I guess.
 
Back
Top