Score:0

How to make mounting a certain device read-only?

ng flag

When I connect my camera to my Xubuntu 18.04 computer, it's mounted with write permissions, which isn't exactly desirable. How can I make it so that it, and any other camera, will be mounted read-only?

This is what mtab shows for it: /dev/sdd1 /media/me/king64 exfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,iocharset=utf8,namecase=0,errors=remount-ro 0 0

But sdd1 could be anything else too, so adding that line to fstab with ro wouldn't be a proper solution. Better than nothing sure, but is there another way?

24601 avatar
in flag
Does this answer your question? [How to mount a USB device in read only mode?](https://askubuntu.com/questions/250551/how-to-mount-a-usb-device-in-read-only-mode)
guiverc avatar
cn flag
FYI: Are you aware that *flavors* of Ubuntu only come with three years of supported life (five years applies to Ubuntu Desktop, Ubuntu Server but not flavors), so you're asking about a release that is EOL. (https://fridge.ubuntu.com/2020/08/14/ubuntu-18-04-5-lts-released/ or a recent UWN - https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/Issue681#Lubuntu_18.04_LTS_End_of_Life_and_Current_Support_Statuses highlights the EOL notices for Lubuntu/Ubuntu-MATE/Kubuntu/Ubuntu-Budgie; Xubuntu didn't announce EOL but refer https://xubuntu.org/release/18-04/ you'll see it's 29 April 2021)
Xutulu avatar
ng flag
@24601 Not really, It's helpful-ish, but doesn't really answer much. I looked into things, and it seems like Thunar has a volume manager that automatically mounts removable media and stuff. How to get that thingie to detect cameras and mount them as read-only would be *the* answer. One potential solution would be to mount stuff under the Removable Storage section and check the photo importing option under Camera section, which takes a custom command, which could be a remount command. Dunno if it'd work, and it'd be a hack at best. Maybe it's just best to mount manually.
Xutulu avatar
ng flag
@guiverc Ah, oh. Thanks for the info, I'll go get the latest LTS. I'm fairly sure it doesn't matter in this particular instance, but yeah.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.