Closed sualko closed 5 years ago
Another solution found here instead deleting the services https://askubuntu.com/questions/673259/restricting-mtp-devices-from-being-mounted-by-a-user-group
Enter this location as root /usr/lib/gvfs
"sudo nautilus" will be easy if you tend to use GUI
sudo nautilus
and then navigate to computer/usr/lib/gvfs
There will be list of services Remove the execute permission by right clicking the appropriate service-->properties-->permission-->unckeck "execute" and change the read only access from "read only" to "none".
Remove the execute permission for
gvfsd-mtp
gvfs-mtp-volume-monitor(for safer side)
gvfsd-gphoto2
gvfs-gphoto2-volume-monitor(for safer side)
sudo chmod -x /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
Is enough. Only needs a reboot after removed execution permissions.
The current documentation recommends to delete the gvfs services which is a pretty rough action. I think it would be better to automatically unmount the camera, like described in https://askubuntu.com/a/301133. If #86 is merged, I will create a pr.