This article explains the steps you can take to enable or disable mounting external storage devices as read-only devices in Ubuntu Linux.
By default, when you connect an external storage drive to Ubuntu Linux, users can read from and write to it. However, Ubuntu Linux also has settings that allow system administrators to mount all storage devices as read-only devices so that users can only read from and not write to the drives.
When this policy is enabled, any external storage device connected to Ubuntu Linux will not be writable, thus protecting your confidential and personal data from being written to a storage device attached to your computer.
Enable or disable mounting external storage devices as read-only
As described above, Ubuntu Linux allows system administrators to set a policy to mount all external storage devices as read-only.
Below is how to do that.
Enable or Disable mounting storage devices as read-only via the Terminal
Like many other Linux distributions, most system settings changes are done using the command terminal. Most Linux users should be somehow familiar with the command terminal.
First, open the Terminal app in Ubuntu Linux.
You can do that by pressing the Super key (or Windows key) to show the Overview screen. Then, use the search box to search for ‘Terminal.’
Select the Terminal app to launch.
Alternatively, press the keyboard shortcut (CTRL + ALT + T) on your keyboard to launch the Terminal app.
When the Terminal app opens, type the commands below to enable the policy to mount all external storage devices as read-only.
gsettings set org.gnome.desktop.lockdown mount-removable-storage-devices-as-read-only true
Run the commands below to reverse the change, mount all storage devices as normal, and read and write.
gsettings set org.gnome.desktop.lockdown mount-removable-storage-devices-as-read-only false
Enable or Disable mounting storage devices as read-only devices using the Dconf Editor
You can also use Dconf Editor to make typical system changes if you can’t use the command Terminal app.
If you are familiar with Windows, you know about Windows Registry Editor.
Ubuntu Linux doesn’t have a registry database to configure hidden system settings. Howerver, Ubuntu Linux uses the Dconf Editor tool to change low-level system configurations and settings.
You can call it a Ubuntu Linux Registry Editor because it provides similar functionality without a massive Windows system database.
To use Dconf Editor, you must first install it since it doesn’t come with Ubuntu Linux.
Read the post below to learn how to install software on Ubuntu Linux.
In the Ubuntu Software app, search for Dconf Editor to install.
After installing and launching the Dconf Editor app, navigate to the path below:
org -> gnome -> desktop -> lockdown
Scroll down, locate the mount removable storage devices as read-only settings, and toggle the button to the On position to mount all storage devices as read-only.
To enable it, toggle the button back to the Off position.
When this setting is enabled, the next time you connect a USB storage device to Ubuntu Linux, you won’t be able to write to it.
That should do it!
This post showed you how to enable or disable mounting storage devices as read-only devices on Ubuntu Linux. Please use the comment form below if you find any errors above or have something to add.