Solved User does not have permission to unmount a device mounted with udisksctl

Hi,

I use a MOUNT.sh script that uses udisksctl to mount my devices:
Code:
#!/bin/sh
ls /dev/da*|xargs -n1 udisksctl mount -b
I can unmount my devices with udisksctl unmount without problem. But when I use the umount or pcmanfm command to unmount the device I get an error:
Code:
umount: unmount of /media/Generic_MassStorageClass_000000001621_s1 failed: Operation not permitted
I have a computer where I do not have the error but on the other the error this product. I compared the processes, the installed packages, I couldn't find why... Both computers are on version 14.0 amd64. Anyone have an idea, thanks?
 
Missed to record where I've got this from, but I have attached non-default rules file as /usr/local/etc/polkit-1/rules.d/10-udisks2.rules.
Note that I've added extention .txt to upload here.
Rename before you copy it.
 

Attachments

I tried dsbmc-cli -a for automatic device mounting, it works.
But I still can't unmount devices with umount command.
With the file /usr/local/etc/polkit-1/rules.d/10-udisks2.rules I still get the same error.
Thanks for the answers.
 
I tried dsbmc-cli -a for automatic device mounting, it works.
But I still can't unmount devices with umount command.
With the file /usr/local/etc/polkit-1/rules.d/10-udisks2.rules I still get the same error.
Thanks for the answers.
Did you restart your computer after that? Possibly restart is required for polkit to pick the configuration correctly.
And assuming you already have vfs.usermount=1 in your /etc/sysctl.conf or /boot/loader.conf, if even restart doesn't help, sysutils/npmount could help you.
See npmount(1) for details.
 
Thank you for your help but I found the solution by comparing my two computers, it's simple, it's just a question of rights on the /sbin/umount file:
# chmod u+s /sbin/umount
# ls -l /sbin/umount
-r-sr-xr-x 1 root wheel 19152 6 déc. 01:03 /sbin/umount

Now I can unmount the devices with pcmanfm for example.
Thank you for recommending dsbmd to me, it works very well even with my phone.
 
Back
Top